Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context managers #4

Open
Lispython opened this issue Sep 5, 2011 · 1 comment
Open

Context managers #4

Lispython opened this issue Sep 5, 2011 · 1 comment
Assignees

Comments

@Lispython
Copy link
Owner

Need add context manager to store session on one closure/namespace with sharing data between mathods calls

Example

 with human_curl as hurl:
     r1 = hurl.get("http://google.com")
     r2 = hurl.get("http://yandex.com")

or

 headers = dict(...)
 with human_curl(proxy=("127.0.0.1",8080), headers=headers) as hurl:
     # all human_curl arguments give into methods
     r1 = hurl.get("http://google.com")
     r2 = hurl.get("http://yandex.com")
@ghost ghost assigned Lispython Sep 5, 2011
@honzajavorek
Copy link

This could mimick requests.Session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants