From: Jay Hannah Date: Fri, 5 Jan 2018 16:22:13 +0000 (-0600) Subject: Catalyst::Test request() docs patch X-Git-Tag: 5.90116~11^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=1429cf52b11b8596e75973878d8031b37cffdfd9 Catalyst::Test request() docs patch This method also accepts HTTP::Request objects, and HTTP::Request::Common objects are especially helpful if you need to send additional headers in the request. --- 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,