Skip to content
Myr

docs update

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 70faca2 · Browse files · 3 files+47 added−19 removed
This commit

State

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

Diff stats

3 files+47 added−19 removed

  • other:+47 added−19 removed

3 files+47 added−19 removed

modified:docs/api.rst+10 added-12 removed
16 unmodified lines
17They all return an instance of the :class:`Response <Response>` object.1819.. autofunction:: request2021---------------------2223.. autoclass:: requests.Request24 :inherited-members:2526.. autoclass:: Response27 :inherited-members:2829---------------------3021.. autofunction:: head22.. autofunction:: get23.. autofunction:: post24.. autofunction:: put25.. autofunction:: patch26.. autofunction:: delete272839-----------------29Lower-Level Classes30~~~~~~~~~~~~~~~~~~~3141.. autofunction:: session32.. autoclass:: requests.Request33 :inherited-members:3435.. autoclass:: Response36 :inherited-members:3738Sessions39--------4041.. autoclass:: Session42 :inherited-members:4344
87 unmodified lines
modified:requests/models.py+21 added-1 removed
155 unmodified lines
156 :param params: dictionary of URL parameters to append to the URL.157 :param auth: Auth handler or (user, pass) tuple.158 :param cookies: dictionary or CookieJar of cookies to attach to this request.159 :param hooks: dictionary of callback hooks, for internal usage.160161 Usage::162163 >>> import requests164 >>> req = requests.Request('GET', 'http://httpbin.org/get')165 >>> req.prepare()166 <PreparedRequest [GET]>167168 """169 def __init__(self,170 method=None,171 url=None,
49 unmodified lines
221class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):222 """The fully mutable :class:`PreparedRequest <PreparedRequest>` object,223 containing the exact bytes that will be sent to the server.224217 Generated from a :class:`Request <Request>` object or manually.225 Generated from either a :class:`Request <Request>` object or manually.226227 Usage::228229 >>> import requests230 >>> req = requests.Request('GET', 'http://httpbin.org/get')231 >>> r = req.prepare()232 <PreparedRequest [GET]>233234 >>> s = requests.Session()235 >>> s.send(r)236 <Response [200]>237238 """239240 def __init__(self):241 #: HTTP verb to send to the server.
365 unmodified lines
modified:requests/sessions.py+16 added-6 removed
129 unmodified lines
130 yield resp131132133class Session(SessionRedirectMixin):134 """A Requests session."""134 """A Requests session.135136 Provides cookie persistience, connection-pooling, and configuration.137138 Basic Usage::139140 >>> import requests141 >>> s = requests.Session()142 >>> s.get('http://httpbin.org/get')143 200144 """145146 def __init__(self):147148 #: A case-insensitive dictionary of headers to be sent on each149 #: :class:`Request <Request>` sent from this150 #: :class:`Session <Session>`.151 self.headers = default_headers()152143 #: Authentication tuple or object to attach to153 #: Default Authentication tuple or object to attach to154 #: :class:`Request <Request>`.155 self.auth = None156157 #: Dictionary mapping protocol to the URL of the proxy (e.g.
8 unmodified lines
166 #: :class:`Request <Request>`. The dictionary values may be lists for167 #: representing multivalued query parameters.168 self.params = {}169160 #: Stream response content.170 #: Stream response content default.171 self.stream = False172163 #: SSL Verification.173 #: SSL Verification default.174 self.verify = True175166 #: SSL certificate.176 #: SSL certificate default.177 self.cert = None178179 #: Maximum number of redirects to follow.180 self.max_redirects = DEFAULT_REDIRECT_LIMIT181172 #: Should we trust the environment182 #: Should we trust the environment?183 self.trust_env = True184185 # Set up a CookieJar to be used by default186 self.cookies = cookiejar_from_dict({})
214 unmodified lines