spyoungtech / grequests

Requests + Gevent = <3
https://pypi.python.org/pypi/grequests
BSD 2-Clause "Simplified" License
4.46k stars 331 forks source link

Cisco ACI grequests returns 403 error #105

Closed sindhujit closed 4 years ago

sindhujit commented 7 years ago

I am getting 403 response for all of my urls after I make a call to the Cisco ACI fabrics at the same time. Sample code:-

for each in range(0,len(urls)):
            response.append(grequests.get(urls[each],cookies=cookiesArray[each]))
eachresp1 = grequests.map(response)
print(eachresp1,"eachresp1")
for r in eachresp1:
           respArray.append(r.json())

The eachresp returns 403 for each of the fabric url. Works fine with requests module when sending single url. But for faster results, I want to use grequests.

spyoungtech commented 4 years ago

It's possible that, due to the monkeypatching, fabric is broken by grequests. Consider trying to reorder your imports to see if that helps any.

For now I'm going to close this issue since it's been inactive, but feel free to comment back if you can still participate in this and I will reopen.