Skip to content
Myr

hmmm

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 2b4ca0b · Browse files · 2 files+11 added−14 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−14 removed

  • other:+11 added−14 removed

2 files+11 added−14 removed

modified:requests/hooks.py+2 added-5 removed
6 unmodified lines
7This module provides the capabilities for the Requests hooks system.89Available hooks:1011``args``:12 A dictionary of the arguments being sent to Request().1311``pre_request``:12 The Request object, directly after being created.1314``pre_send``:
7 unmodified lines
2223"""242529HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response')26HOOKS = ('pre_prepare', 'post_prepare', 'pre_request', 'pre_send', 'post_request', 'response')27# TODO: response is the only one283129def dispatch_hook(key, hooks, hook_data):30 """Dispatches a hook dictionary on a given piece of data."""3132 hooks = hooks or dict()
13 unmodified lines
modified:requests/models.py+9 added-9 removed
5 unmodified lines
67This module contains the primary objects that power Requests.8"""910import os11import socket12import collections10# import os11# import socket12# import collections13import logging1415from datetime import datetime15# from datetime import datetime16from io import BytesIO1718from .hooks import dispatch_hook, HOOKS19from .structures import CaseInsensitiveDict20from .status_codes import codes2122from .auth import HTTPBasicAuth, HTTPProxyAuth23from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header24from .packages.urllib3.exceptions import MaxRetryError, LocationParseError25from .packages.urllib3.exceptions import TimeoutError26from .packages.urllib3.exceptions import SSLError as _SSLError27from .packages.urllib3.exceptions import HTTPError as _HTTPError28from .packages.urllib3 import connectionpool, poolmanager24# from .packages.urllib3.exceptions import MaxRetryError, LocationParseError25# from .packages.urllib3.exceptions import TimeoutError26# from .packages.urllib3.exceptions import SSLError as _SSLError27# from .packages.urllib3.exceptions import HTTPError as _HTTPError28# from .packages.urllib3 import connectionpool, poolmanager29from .packages.urllib3.filepost import encode_multipart_formdata3031from .exceptions import (32 ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects,
542 unmodified lines