| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
HttpRequestor
Helper class for sending requests of HTTP with GET and POST
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
api_url = domain url to use when sending requests |
|||
api_method = api method to use when sending requests |
|||
api_params = parameters to send to the method when sending requests |
|||
api_header = Authorization to put into header when sending requests |
|||
api_post_payload = Payload to be delivered when sending a POST request |
|||
logger = Nonelogger to send loggin information to. |
|||
api_path_params =
|
|||
formatted_params =
|
|||
|
|||
|
Inherited from |
|||
|
|||
Constructor for class Args : api_url : (str) URL to the base of the API logger : (logger) instance of a logging object configured in testing project
|
Constucts a request with the parameters formated in path parameter format.
EX: http://myserver.com/api/method/pathParam1/pathParam2
Args :(list) a list of parameter values to send to the api
Returns :null
Raises :null
|
Constucts a request with the parameters formated in query parameter format.
EX: http://myserver.com/api/method?queryParam=paramValue
Args :(dict) a dictionary of parameter names and values to send to the api
Returns :null
Raises :null
|
Sends a GET HTTP request. Make sure you have set the classe's api_params,api_url and api_method first Args :null Returns : (file-like object) the HTTP response Raises :null |
Sends a POST HTTP request. Make sure you have set the classe's api_params,api_url,
api_header and api_method first
Args :null
Returns : (file-like object) the HTTP response
Raises :null
|
Creates the authentication for accessing HTTP
Args :
credentials : (dict) 'username' and 'password' keys for a dictionary containing the HTTP Basic Auth to access
the api
Returns : null
Raises :null
|
|
|||
loggerlogger to send loggin information to. Logger comes from pytest test definitions
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Fri Feb 21 15:04:14 2014 | http://epydoc.sourceforge.net |