Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b5646a

Browse files
committed
Enhanced HTTPHandler documentation.
1 parent 9907918 commit 1b5646a

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

Doc/library/logging.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,12 +2578,16 @@ supports sending logging messages to a Web server, using either ``GET`` or
25782578
``POST`` semantics.
25792579

25802580

2581-
.. class:: HTTPHandler(host, url, method='GET')
2582-
2583-
Returns a new instance of the :class:`HTTPHandler` class. The instance is
2584-
initialized with a host address, url and HTTP method. The *host* can be of the
2585-
form ``host:port``, should you need to use a specific port number. If no
2586-
*method* is specified, ``GET`` is used.
2581+
.. class:: HTTPHandler(host, url, method='GET', secure=False, credentials=None)
2582+
2583+
Returns a new instance of the :class:`HTTPHandler` class. The *host* can be
2584+
of the form ``host:port``, should you need to use a specific port number.
2585+
If no *method* is specified, ``GET`` is used. If *secure* is True, an HTTPS
2586+
connection will be used. If *credentials* is specified, it should be a
2587+
2-tuple consisting of userid and password, which will be placed in an HTTP
2588+
'Authorization' header using Basic authentication. If you specify
2589+
credentials, you should also specify secure=True so that your userid and
2590+
password are not passed in cleartext across the wire.
25872591

25882592

25892593
.. method:: emit(record)

0 commit comments

Comments
 (0)