GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::WebTest::Request(3) User Contributed Perl Documentation HTTP::WebTest::Request(3)
 

HTTP::WebTest::Request - HTTP request objects

    use HTTP::WebTest::Request;
    $request = HTTP::WebTest::Request->new;
    my $uri = $request->uri;
    $request->base_uri($base_uri);
    my $base_uri = $request->base_uri;
    my @params = @{$request->params};
    $request->params([@params]);

This class is a subclass of HTTP::Request class. It extends it with continence methods that allow to set or get CGI query params for HTTP request in uniform way independent of HTTP request method.
Each URI in GET requests may consist of two portions: URI of document/resource/etc and CGI query string. In HTTP::Request method "uri" doesn't separate them and operates on them as on single entity. In "HTTP::WebTest::Request" method "uri" is not allowed to modify HTTP request URI. Instead of it methods "base_uri" and "params" should be used to change or get these parts independently.
For POST requests method "base_uri" acts simular to "uri". On the other hand "params" set content of HTTP request in case of POST requests.
CGI request parameters are defined in the way similar to CGI request parameters defenition in HTTP::Request::Common. It is an array of pairs
    ( name1 => value1, name2 => value2, ..., nameN => valueN )
If any value is passed as an array reference it is treated as file upload. See HTTP::Request::Common for more details.
By default GET type of HTTP request is assumed. But if CGI request parameters have data for file upload then POST type of HTTP request is assumed.

Can set non CGI query portion of request URI if $optional_uri is passed.
Returns
Non CGI query portion of request URI.

Method "uri" is redefined. It is same as "base_uri" for non-GET request. For GET requests it returns URI with query parameters.
Returns
Whole URI.

Method "content_ref" is redefined. For POST requests it returns POST query content corresponding to query parameters.

Can set CGI request parameters for this HTTP request object if an array reference $optional_params is passed.
Returns
An reference to an array that contains CGI request parameters.

Copyright (c) 2001-2003 Ilya Martynov. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

HTTP::WebTest
HTTP::WebTest::API
HTTP::Request
HTTP::Request::Common
2003-07-14 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.