Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

All use the same session #13

Closed
JakeAustwick opened this Issue · 2 comments

2 participants

@JakeAustwick

Maybe I'm overlooking a easy option here (just started using python again), but how would I fire off 100 requests with them all using the same session? Is it possible with the current API?

Ideally I'd like to be able to do something like

s = requests.session()
grequests.map(rs, session=s)

Anyone needed this before? How did you approach it?

@reclosedev

It's already possible:

s = requests.session()
rs = [grequests.get(url, session=s) for url in urls]
grequests.map(rs)
@JakeAustwick

Ahh, thanks for the quick help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.