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

Allow custom requests.Session for HTTP #119

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

carlosefr
Copy link
Contributor

@carlosefr carlosefr commented Feb 8, 2021

By allowing the user to pass a requests.Session object (or subclass instance), it becomes possible to manipulate the underlying HTTP connection in custom ways without modifying the driver.

Example use cases:

  • Complex mocking of database responses for testing;
  • Transparently cache (some) responses;
  • Perform complex authentication;
  • ...

The version is bumped to 0.1.6 because this introduces a change in the API and allows users to specify >=0.1.6 in their requirements files.

By allowing the user to pass a custom requests.Session object, it
becomes possible to manipulate the underlying HTTP connection, such as
mock responses or transparently cache them.
@coveralls
Copy link

coveralls commented Feb 8, 2021

Coverage Status

Coverage remained the same at 95.514% when pulling 80c33d1 on carlosefr:custom_http_session into 3dd0e1f on xzkostyan:master.

@xzkostyan xzkostyan merged commit dce3dbb into xzkostyan:master Feb 9, 2021
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

Successfully merging this pull request may close these issues.

3 participants