X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FTest.pm;h=ef2ff18c8aecf4d51a39378bf64b794fd927b673;hp=e121b350293bc707ce6d05d9b2f15e389158828b;hb=1429cf52b11b8596e75973878d8031b37cffdfd9;hpb=b62c4f8b4b612b159ff6e02e350a818f6c6ee5c3 diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index e121b35..ef2ff18 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -256,6 +256,15 @@ header configuration; currently only supports setting 'host' value. my $res = request('foo/bar?test=1'); my $virtual_res = request('foo/bar?test=1', {host => 'virtualhost.com'}); +Alternately, you can pass in an L object to set arbitrary +request headers. + + my $res = request(GET '/foo/bar', + X-Foo => 'Bar', + Authorization => 'Bearer JWT_HERE', + ... + ); + =head2 ($res, $c) = ctx_request( ... ); Works exactly like L, except it also returns the Catalyst context object,