Help for this page

Select Code to Download


  1. or download this
    get '/javascripts/:file' => sub {
        my ($file) = splat;
    ...
            content_type => 'text/javascript',
        );
    };
    
  2. or download this
    response_status_is  [ GET => '/javascripts/test.js' ], 200,
        'response status is 200 for /js/test.js';
    response_content_is [ GET => '/javascripts/test.js' ], 'var test = 1;'
    +, 'Fetched JS';
    response_headers_include [ GET => '/javascripts/test.js' ],
        [ 'Content-Type' => 'text/javascript' ], "MIME type set for JS";
    
  3. or download this
    not ok 4 - Fetched JS
    #   Failed test 'Fetched JS'
    ...
    #   Failed test 'MIME type set for JS'
    #   at t/002_index_route.t line 15.
    # Looks like you failed 2 tests of 5.
    
  4. or download this
    0  Dancer::Response=HASH(0x23dca98)
       'content' => GLOB(0x23eb3e8)
    ...
          'last-modified' => 'Fri, 01 Mar 2013 15:31:21 GMT'
       'pass' => 0
       'status' => 200