From aca91e06f2c83da1553ea8b39814c5c78cb3c433 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 27 Mar 2013 23:46:21 -0400 Subject: [PATCH] Restore Session.request docstring Resolves #1251 --- requests/sessions.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/requests/sessions.py b/requests/sessions.py index c306a8d..26131fc 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -252,6 +252,39 @@ class Session(SessionRedirectMixin): stream=None, verify=None, cert=None): + """Constructs a :class:`Request `, prepares it and sends it. + Returns :class:`Response ` object. + + :param method: method for the new :class:`Request` object. + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary or bytes to be sent in the query + string for the :class:`Request`. + :param data: (optional) Dictionary or bytes to send in the body of the + :class:`Request`. + :param headers: (optional) Dictionary of HTTP Headers to send with the + :class:`Request`. + :param cookies: (optional) Dict or CookieJar object to send with the + :class:`Request`. + :param files: (optional) Dictionary of 'filename': file-like-objects + for multipart encoding upload. + :param auth: (optional) Auth tuple or callable to enable + Basic/Digest/Custom HTTP Auth. + :param timeout: (optional) Float describing the timeout of the + request. + :param allow_redirects: (optional) Boolean. Set to True by default. + :param proxies: (optional) Dictionary mapping protocol to the URL of + the proxy. + :param return_response: (optional) If False, an un-sent Request object + will returned. + :param config: (optional) A configuration dictionary. See + ``request.defaults`` for allowed keys and their default values. + :param prefetch: (optional) whether to immediately download the response + content. Defaults to ``True``. + :param verify: (optional) if ``True``, the SSL cert will be verified. + A CA_BUNDLE path can also be provided. + :param cert: (optional) if String, path to ssl client cert file (.pem). + If Tuple, ('cert', 'key') pair. + """ cookies = cookies or {} proxies = proxies or {} -- 2.7.4