Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::httpserver::request(3pm) [debian man page]

Net::HTTPServer::Request(3pm)				User Contributed Perl Documentation			     Net::HTTPServer::Request(3pm)

NAME
Net::HTTPServer::Request - HTTP request SYNOPSIS
Net::HTTPServer::Request handles the parsing of a request. DESCRIPTION
Net::HTTPServer::Request takes a full request, parses it, and then provides a nice OOP interface to pulling out the information you want from a request. METHODS
Cookie([cookie]) Returns a hash reference of cookie/value pairs. If you specify a cookie, then it returns the value for that cookie, or undef if it does not exist. Env([var]) Returns a hash reference of variable/value pairs. If you specify a variable, then it returns the value for that variable, or undef if it does not exist. Header([header]) Returns a hash reference of header/value pairs. If you specify a header, then it returns the value for that header, or undef if it does not exist. Method() Returns the method of the request (GET,POST,etc...) Path() Returns the path portion of the URL. Does not include any query strings. Procotol() Returns the name and revision that the request came in with. Query() Returns the query portion of the URL (if any). You can combine the Path and the Query with a ? to get the real URL that the client requested. Request() Returns the entire request as a string. Response() Returns a Net::HTTPServer::Response object with various bits prefilled in. If you have created session via the Session() method, then the session will already be registered with the response. Session() Create a new Net::HTTPServer::Session object. If the cookie value is set, then the previous state values are loaded, otherwise a new session is started. URL() Returns the URL of the request. AUTHOR
Ryan Eatmon COPYRIGHT
Copyright (c) 2003-2005 Ryan Eatmon <reatmon@mail.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-03 Net::HTTPServer::Request(3pm)

Check Out this Related Man Page

Net::SIP::Request(3pm)					User Contributed Perl Documentation				    Net::SIP::Request(3pm)

NAME
Net::SIP::Request - handling of SIP request packets SYNOPSIS
my $req = Net::SIP::Request->new( 'INVITE',... ); my $ack = $req->create_ack(); DESCRIPTION
Subclass of Net::SIP::Packet for handling request packets. Has methods to create responses to requests and to authorize requests. EXAMPLES
# create INVITE request my $invite = Net::SIP::Request->new( 'INVITE', 'sip:you@example.com', { from => ..., to => ... }, Net::SIP::SDP->new( ... ) ); # somehow send request and retrieve response $resp ... if ( $resp->code eq '401' or $resp->code eq '407' ) { # need to authorize request $invite->authorize( $resp, [ username, password ] ); # somehow send again and retrieve response $resp ... } if ( $resp->code ~m{^[2345]dd} ) { # got final response, send ACK my $ack = $invite->create_ack( $resp ); # somehow send $ack ... } CONSTRUCTOR
Inherited from Net::SIP::Packet. See there. METHODS
method Get method of request. uri Get URI part of request. set_uri ( STRING ) Set URI of request to STRING set_cseq ( NUMBER ) Set sequence number if "CSeq" header to NUMBER. create_ack ( RESPONSE ) Returns Net::SIP::Request object for ACK request for the case when Net::SIP::Response RESPONSE was received in reply for packet $self. create_cancel Returns Net::SIP::Request object to cancel request in $self. create_response ( CODE, [MSG,] [ \%HEADER, BODY ] ) Returns Net::SIP::Response packet for the received request $self with numerical code CODE and text message MSG. Header for the response will be based on the request, but can be added or overridden using \%HEADER. If MSG is not given (e.g. argument is missing, second argument is \%HEADER already) a builtin message for the code will be used. For details to \%HEADER and BODY see new_from_parts in Net::SIP::Packet. authorize ( RESPONSE, AUTH ) Tries to authorize request $self based on the information in RESPONSE (a 401 or 407 "Authorization required" response) and AUTH. AUTH is either "[ user,pass ]" if a global authorization info exists for all realms or "{ realm1 => [ user1,pass1 ], realm2 => [ user2,pass2 ],... }" if different credentials are provided for different realms or a callback "callback(realm)->[user,pass]". The realms, for which authorization is needed, are read from RESPONSE. The request $self is modified in-place. If a modification occurred, e.g. if (parts of) the authorization requests could be resolved it will return TRUE, else FALSE. Supports only RFC2617 with md5 and empty qop or qop 'auth', not md5-sess or qop's like 'auth-int'. perl v5.14.2 2012-06-26 Net::SIP::Request(3pm)
Man Page