scistag.webstag.server.web_request.WebRequest

class WebRequest(path, relative_path, method, headers, body, parameters, base_url, url, host_url, remote_addr, environ, url_root, mimetype, host)[source]

Bases: object

Defines the parameters of a web request

Methods

Attributes

__annotations__

__dataclass_fields__

__dataclass_params__

__dict__

__doc__

__hash__

__module__

__weakref__

list of weak references to the object (if defined)

path

The absolute url path (excluding host/IP)

relative_path

The relative URL path

method

The request method, e.g.

headers

The headers passed in

body

The body data of the POST request

parameters

The query parameters

base_url

The base url, e.g.

url

The full url pointing to our service http://localhost/myClass/myMethod

host_url

The url to the host, e.g.

remote_addr

The clients' IP, e.g.

environ

The request headers, e.g.

url_root

The url of the blueprint/service being called, e.g.

mimetype

The request body's content type, e.g.

host

The host name/IP, e.g.

base_url: str

The base url, e.g. http://localhost/myClass/myMethod

body: Optional[bytes]

The body data of the POST request

environ: dict

The request headers, e.g. “HTTP_USER_AGENT”

headers: dict

The headers passed in

host: str

The host name/IP, e.g. localhost

host_url: str

The url to the host, e.g. http://localhost

method: str

The request method, e.g. GET, POST, PUT etc.

mimetype: str

The request body’s content type, e.g. image/jpeg

parameters: dict

The query parameters

path: str

The absolute url path (excluding host/IP)

relative_path: str

The relative URL path

remote_addr: str

The clients’ IP, e.g. 192.168.3.98

url: str

The full url pointing to our service http://localhost/myClass/myMethod

url_root: str

The url of the blueprint/service being called, e.g. http://localhost/