]>
Dogcows Code - chaz/p5-HTTP-AnyUA/blob - t/app.psgi
1 # A little plack app for testing HTTP::AnyUA
3 # When a request is made, the environment will be sent back to the test which will assert that the
4 # request was made correctly.
11 mount
'/create-document' => sub {
14 [201, ['Content-Type' => 'text/plain'], ['created document']];
17 mount
'/get-document' => sub {
20 [200, ['Content-Type' => 'text/plain', 'x-foo' => 'bar'], ['this is a document']];
23 mount
'/modify-document' => sub {
30 [302, ['Content-Type' => 'text/plain', 'Location' => '/bar'], ['the thing you seek is not here']];
33 [301, ['Content-Type' => 'text/plain', 'Location' => '/baz'], ['not here either']];
38 [200, ['Content-Type' => 'text/plain'], ['you found it']];
42 [200, ['Content-Type' => 'text/plain'], ['this is a test server']];
This page took 0.040284 seconds and 4 git commands to generate.