I'm not sure if this is an expected behavior or not, but I'm suffering from a problem where my callback is receiving the initial 302 response from the request, rather than the subsequent 200 response I expect.
Given the following examples using requests and grequests I would expect the output to be the same, however they are not.
With requests
response = requests.get('http://example.com/search/value')
print(response.status_code)
print(response.url)
print(responose.history)
for hist in response.history:
print(hist.url)
Actually realized my error was result of raising an exception in my callback, which triggered the exception handler to return a value and, as a result, preventing the subsequent response from happening
I'm not sure if this is an expected behavior or not, but I'm suffering from a problem where my callback is receiving the initial 302 response from the request, rather than the subsequent 200 response I expect.
Given the following examples using
requests
andgrequests
I would expect the output to be the same, however they are not.With requests
Output
With grequests
Output