HSL 2.0 Framework
Description of the framework
Public Member Functions |Private Member Functions |List of all members
hsl20_4_http_server.hsl20_4_http_server.Request Class Reference

HTTP Requests. More

..

Public Member Functions

def__init__ (self)
Constructor. More...
defget_method (self)
Returns the retrieval method. More...
defget_path (self)
Returns the complete path of the query without the query part. More...
defget_fullpath (self)
Returns the complete path of the query including the query part. More...
defget_http_version (self)
Returns the HTTP version of the retrieval. More...
defget_query (self)
Returns all parameters from the query part of the query in the form of a dictionary. More...
defget_query_string (self)
Returns the entire query string of the query. More...
defget_header (self, key)
Returns the value of a header entry. More...
defget_headers (self)
Returns the headers transmitted by the remote peer as dictionary. More...
defget_body (self)
Returns the body of the HTTP request. More...

Private Member Functions

def_set_info (self, method, path, version)
Sets the HTTP information
def_set_header (self, header)
Sets the headers
def_set_body (self, body)
Sets the request body
def_clear (self)
Removes all references

Detailed Description

HTTP requests

This class encapsulates all parameters that the HTTP request has left with the server. For more information about the flow and use of this class, see HTTP Server

Constructor & Destructor Documentation

◆ __init__()

def hsl20_4_http_server.hsl20_4_http_server.Request.__init__ ( self)

Constructor

Warning
This class should not be instantiated directly

Member Function Documentation

◆ get_body()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_body ( self)

Returns the body of the HTTP request

Returns
string
Dates. Returns None if the query does not contain a body element

◆ get_fullpath()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_fullpath ( self)

Returns the complete path of the query including the query part

Returns
string
Path

◆ get_header()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_header ( self,
key
)

Returns the value of a header entry

Parameters
keystring
Key
Returns
string
Value. Returns None, if an invalid key was passed

◆ get_headers()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_headers ( self)

Returns the headers transmitted by the remote peer as dictionary

Note
To be observed: The keys will be returned completely in lower case!
Returns
dictionary
All headers in the form of a dictionary

◆ get_http_version()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_http_version ( self)

Returns the HTTP version of the retrieval

Returns
string
Version (e.g. HTTP\1.0)

◆ get_method()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_method ( self)

Returns the retrieval method

Returns
string
Retrieval method

◆ get_path()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_path ( self)

Returns the complete path of the query without the query part

Returns
string
Path

◆ get_query()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_query ( self)

Returns all parameters from the query part of the query in the form of a dictionary

The values are already decoded

Returns
dictionary
Parameters

◆ get_query_string()

def hsl20_4_http_server.hsl20_4_http_server.Request.get_query_string ( self)

Returns the entire query string of the query

Returns
string
Query string

The documentation for this class was generated from the following file: