modules.dhbw.util.reqget

modules.dhbw.util.reqget(*, url='', headers=None, params=None, allow_redirects=False, return_code=200)[source]

Wrapper for a get 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

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