From 857e8ab1e53fc75822898019238b5d61a2f01490 Mon Sep 17 00:00:00 2001 From: Alex Gaynor <alex.gaynor@gmail.com> Date: Tue, 27 May 2014 14:50:18 -0500 Subject: [PATCH] Wrap lines at the appropriate length and use native sphinx constructs Change-Id: I116b7007d017469e22bf22fb2a98dfa0b765188d --- doc/source/transport.rst | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/source/transport.rst b/doc/source/transport.rst index 5aac040c3..70463f2f0 100644 --- a/doc/source/transport.rst +++ b/doc/source/transport.rst @@ -1,15 +1,16 @@ Transport ========= -Class ``openstack.transport.Transport`` is a subclass of ``requests.Session`` that -adds some features that are common in OpenStack APIs or can be globally controlled -by an application. Its use is incredibly similar to ``requests.Session`` such -that we only will cover the differences in detail here. +Class ``openstack.transport.Transport`` is a subclass of ``requests.Session`` +that adds some features that are common in OpenStack APIs or can be globally +controlled by an application. Its use is incredibly similar to +``requests.Session`` such that we only will cover the differences in detail +here. Transport object ---------------- -Class ``openstack.transport.Transport(user_agent=None, verify=True, redirect=DEFAULT_REDIRECT_LIMIT, ...)`` +.. class:: openstack.transport.Transport(user_agent=None, verify=True, redirect=DEFAULT_REDIRECT_LIMIT) Create a new ``Transport`` object. In addition to those listed below, all arguments available to ``requests.Session`` are available here: @@ -23,13 +24,15 @@ arguments available to ``requests.Session`` are available here: Method ``Transport.request(method, url, redirect=None, **kwargs)`` -Perform an HTTP request. The following arguments differ from ``requests.Session``: +Perform an HTTP request. The following arguments differ from +``requests.Session``: -* redirect - (integer) The maximum number of redirections followed in a request. - (boolean) No redirections if False, ``requests.Session`` handles redirection - if True. (default: ``openstack.transport.DEFAULT_REDIRECT_LIMIT``) -* json - Request body to be encoded as JSON. Overwrites ``data`` argument if present. - (default: ``None``) +* redirect - (integer) The maximum number of redirections followed in a + request. (boolean) No redirections if False, ``requests.Session`` handles + redirection if True. (default: + ``openstack.transport.DEFAULT_REDIRECT_LIMIT``) +* json - Request body to be encoded as JSON. Overwrites ``data`` argument if + present. (default: ``None``) * user_agent - Set the default ``User-Agent`` header (default: ``None``) Examples @@ -108,5 +111,6 @@ the ``User-Agent`` header is as follows: * If the ``user_agent`` argument is included in the ``request()`` call use it * Else if ``User-Agent`` is set in the headers dict use it -* Else if ``user_agent`` argument is included in the ``Transport`` construction use it +* Else if ``user_agent`` argument is included in the ``Transport`` construction + use it * Else use ``transport.DEFAULT_USER_AGENT``