modules.dhbw.util.reqpost
- modules.dhbw.util.reqpost(*, url='', headers=None, params=None, payload=None, allow_redirects=False, return_code=200)[source]
Wrapper for a post request with return code check.
- urlstr
the destination url which should receive the post request
- headersdict
a dictionary of used headers for the request
- paramsdict
a dictionary of parameters used for the request
- payloaddict
a dictionary of proccessable content for the destination application
- allow_redirectsbool
whether redirects should be followed or not
- return_codeint
expected return code of the request
- rrequests.models.Response
response of the request
- RequestException
if the expected return code differs from the actual return code