Response object¶
- code
HTTP status code,
- data
data part of HTTP response,
- headers
HTTP headers,
- cookies
cookies,
- callback
function that builds completely custom request
- sleep
amount of time to wait before send response data
Response object is a dict with keys:
response :: code¶
- type
int
HTTP status code
response :: data¶
- type
bytes
body of HTTP response
response :: headers¶
- type
list
HTTP headers
response :: path¶
- type
str
The path fragment of the requested URL
response :: cookies¶
- type
list
Cookies
response :: callback¶
- type
function
The function that builds custom response
response :: sleep¶
- type
int
Time to wait before send data to HTTP client