bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308)
Allow to add HTTP headers to XML-RPC requests sent to the server.
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst
index 27d92e3..3240381 100644
--- a/Doc/library/xmlrpc.client.rst
+++ b/Doc/library/xmlrpc.client.rst
@@ -34,10 +34,7 @@
.. 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 @@
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