logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Net::HTTPServer::Request - HTTP request

Author

       Ryan Eatmon

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.

Name

       Net::HTTPServer::Request - HTTP request

Synopsis

       Net::HTTPServer::Request handles the parsing of a request.

See Also