steps.api.utils.request
Attributes
Classes
A user-created |
Module Contents
- class steps.api.utils.request.Request(api=None, timeout: int = 3)[source]
Bases:
requests.RequestA user-created
Requestobject.Used to prepare a
PreparedRequest, which is sent to the server.- Parameters:
method – HTTP method to use.
url – URL to send.
headers – dictionary of headers to send.
files – dictionary of {filename: fileobject} files to multipart upload.
data – the body to attach to the request. If a dictionary or list of tuples
[(key, value)]is provided, form-encoding will take place.json – json for the body to attach to the request (if files or data is not specified).
params – URL parameters to append to the URL. If a dictionary or list of tuples
[(key, value)]is provided, form-encoding will take place.auth – Auth handler or (user, pass) tuple.
cookies – dictionary or CookieJar of cookies to attach to this request.
hooks – dictionary of callback hooks, for internal usage.
Usage:
>>> import requests >>> req = requests.Request('GET', 'https://httpbin.org/get') >>> req.prepare() <PreparedRequest [GET]>
- api: steps.api.utils.api.Api = None[source]