arjuna.tpi.httpauto.request module¶
- class arjuna.tpi.httpauto.request.HttpRequest(session, request, label=None, xcodes=None, allow_redirects=True, timeout=None, cookies=None)¶
Bases:
arjuna.tpi.httpauto.packet.HttpPacket
Encapsulates HTTP request packet.
- Parameters
session – HttpSession object which created this HttpRequest.
request – requests library’s Request object wrapped by this class.
- Keyword Arguments
label – Label for this request. If available, it is used in Reports and logs.
xcodes – Expected Status Code(s)
allow_redirects – If True, redirections are allowed for the HTTP message. Default is True.
timeout – How long to wait for the server to send data before giving up.
cookies – Cookie dictionary
- property allow_redirects¶
True if redirects are allowed for this request.
- property content¶
Content of this request message as plain unformatted text.
- property label: str¶
Label for this request object.
- property method: str¶
HTTP Method/Verb used by this request.
- property query_params: dict¶
URL Query Parameters for this request object.
- classmethod repr_as_str(*, method, url, headers, content=None)¶
- property text¶
Content of this request message as Text object.
- property timeout¶
Timeout for this request.
- property url: str¶
URL correspnding to this request message.
- property xcodes: set¶
Expected status codes for this request.