mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
hmmm
This commit is contained in:
+2
-5
@@ -8,9 +8,6 @@ This module provides the capabilities for the Requests hooks system.
|
||||
|
||||
Available hooks:
|
||||
|
||||
``args``:
|
||||
A dictionary of the arguments being sent to Request().
|
||||
|
||||
``pre_request``:
|
||||
The Request object, directly after being created.
|
||||
|
||||
@@ -26,8 +23,8 @@ Available hooks:
|
||||
"""
|
||||
|
||||
|
||||
HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response')
|
||||
|
||||
HOOKS = ('pre_prepare', 'post_prepare', 'pre_request', 'pre_send', 'post_request', 'response')
|
||||
# TODO: response is the only one
|
||||
|
||||
def dispatch_hook(key, hooks, hook_data):
|
||||
"""Dispatches a hook dictionary on a given piece of data."""
|
||||
|
||||
+9
-9
@@ -7,12 +7,12 @@ requests.models
|
||||
This module contains the primary objects that power Requests.
|
||||
"""
|
||||
|
||||
import os
|
||||
import socket
|
||||
import collections
|
||||
# import os
|
||||
# import socket
|
||||
# import collections
|
||||
import logging
|
||||
|
||||
from datetime import datetime
|
||||
# from datetime import datetime
|
||||
from io import BytesIO
|
||||
|
||||
from .hooks import dispatch_hook, HOOKS
|
||||
@@ -21,11 +21,11 @@ from .status_codes import codes
|
||||
|
||||
from .auth import HTTPBasicAuth, HTTPProxyAuth
|
||||
from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header
|
||||
from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
|
||||
from .packages.urllib3.exceptions import TimeoutError
|
||||
from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||
from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||
from .packages.urllib3 import connectionpool, poolmanager
|
||||
# from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
|
||||
# from .packages.urllib3.exceptions import TimeoutError
|
||||
# from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||
# from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||
# from .packages.urllib3 import connectionpool, poolmanager
|
||||
from .packages.urllib3.filepost import encode_multipart_formdata
|
||||
|
||||
from .exceptions import (
|
||||
|
||||
Reference in New Issue
Block a user