diff options
Diffstat (limited to 'Doc/library/xmlrpc.client.rst')
| -rw-r--r-- | Doc/library/xmlrpc.client.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst index 27d92e3247..3240381953 100644 --- a/Doc/library/xmlrpc.client.rst +++ b/Doc/library/xmlrpc.client.rst @@ -34,10 +34,7 @@ between conformable Python objects and XML on the wire. .. class:: ServerProxy(uri, transport=None, encoding=None, verbose=False, \ allow_none=False, use_datetime=False, \ - use_builtin_types=False, *, context=None) - - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + use_builtin_types=False, *, headers=(), context=None) A :class:`ServerProxy` instance is an object that manages communication with a remote XML-RPC server. The required first argument is a URI (Uniform Resource @@ -59,9 +56,18 @@ between conformable Python objects and XML on the wire. presented as :class:`bytes` objects; this flag is false by default. :class:`datetime.datetime`, :class:`bytes` and :class:`bytearray` objects may be passed to calls. + The *headers* parameter is an optional sequence of HTTP headers to send with + each request, expressed as a sequence of 2-tuples representing the header + name and value. (e.g. `[('Header-Name', 'value')]`). The obsolete *use_datetime* flag is similar to *use_builtin_types* but it applies only to date/time values. +.. versionchanged:: 3.3 + The *use_builtin_types* flag was added. + +.. versionchanged:: 3.8 + The *headers* parameter was added. + Both the HTTP and HTTPS transports support the URL syntax extension for HTTP Basic Authentication: ``http://user:pass@host:port/path``. The ``user:pass`` portion will be base64-encoded as an HTTP 'Authorization' header, and sent to |
