scistag.webstag.server.web_response.WebResponse

class WebResponse(body, status=200, cache=False)[source]

Bases: object

Methods

Attributes

__annotations__

__dataclass_fields__

__dataclass_params__

__dict__

__doc__

__hash__

__module__

__weakref__

list of weak references to the object (if defined)

cache

Defines if the response may be cached

status

The response code (e.g 200 = OK)

body

The response body.

body: Optional[Union[bytes, str]]

The response body. Either, text, binary raw data or nothing

cache: bool = False

Defines if the response may be cached

status: int = 200

The response code (e.g 200 = OK)