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
  • sessionHttpSession object which created this HttpRequest.

  • requestrequests 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

Label for this request object.

property method

HTTP Method/Verb used by this request.

property query_params

URL Query Parameters for this request object.

classmethod repr_as_str(*, method=None, url=None, headers=None, content=None)
property text

Content of this request message as Text object.

property timeout

Timeout for this request.

property url

URL correspnding to this request message.

property xcodes

Expected status codes for this request.