Parent Directory
|
Revision Log
|
Patch
--- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestRequest.pm 2004/12/02 05:17:21 109451 +++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestRequest.pm 2004/12/02 05:18:18 109452 @@ -780,6 +780,21 @@ But note that redirection will B<not> wo installed. It's best, therefore, to check C<have_lwp> before running tests that rely on a redirection from C<POST>. +Sometimes it is desireable to have C<Apache::TestRequest> remember +cookies sent by the pages you are testing and send them back to the +server on subsequent requests. This is especially necessary when +testing pages whose functionality relies on sessions or the presence +of preferences stored in cookies. + +By default, C<LWP::UserAgent> does B<not> remember cookies between +requests. You can tell it to remember cookies between request by +adding: + + Apache::TestRequest::user_agent(cookie_jar => {}); + +before issuing the requests. + + =head1 FUNCTIONS C<Apache::TestRequest> exports a number of functions that will likely @@ -837,6 +852,11 @@ test server via C<UPLOAD()> and its frie Sends a simple GET request to the Apache test server. Returns an C<HTTP::Response> object. +You can also supply additional headers to be sent with the request by +adding their name/value pairs after the C<url> parameter, for example: + + my $res = GET $url, 'Accept-Language' => 'de,en-us,en;q=0.5'; + =head3 GET_STR A shortcut function for C<GET($uri)-E<gt>as_string>.
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |