Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
1052f89a
Kaydet (Commit)
1052f89a
authored
Mar 31, 2009
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update HTTPResponse documentation and add placeholder for HTTPMessage.
üst
e2573160
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
http.client.rst
Doc/library/http.client.rst
+27
-4
No files found.
Doc/library/http.client.rst
Dosyayı görüntüle @
1052f89a
...
@@ -59,8 +59,8 @@ The module provides the following classes:
...
@@ -59,8 +59,8 @@ The module provides the following classes:
.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
Class whose instances are returned upon successful connection. Not
instantiated
Class whose instances are returned upon successful connection. Not
directly by user.
instantiated
directly by user.
The following exceptions are raised as appropriate:
The following exceptions are raised as appropriate:
...
@@ -433,7 +433,10 @@ also send your request step by step, by using the four functions below.
...
@@ -433,7 +433,10 @@ also send your request step by step, by using the four functions below.
HTTPResponse Objects
HTTPResponse Objects
--------------------
--------------------
:class:`HTTPResponse` instances have the following methods and attributes:
An :class:`HTTPResponse` instance wraps the HTTP response from the
server. It provides access to the request headers and the entity
body. The response is an iterable object and can be used in a with
statement.
.. method:: HTTPResponse.read([amt])
.. method:: HTTPResponse.read([amt])
...
@@ -454,7 +457,9 @@ HTTPResponse Objects
...
@@ -454,7 +457,9 @@ HTTPResponse Objects
.. attribute:: HTTPResponse.msg
.. attribute:: HTTPResponse.msg
An :class:`email.message.Message` instance containing the response headers.
A :class:`http.client.HTTPMessage` instance containing the response
headers. :class:`http.client.HTTPMessage` is a subclass of
:class:`email.message.Message`.
.. attribute:: HTTPResponse.version
.. attribute:: HTTPResponse.version
...
@@ -472,6 +477,12 @@ HTTPResponse Objects
...
@@ -472,6 +477,12 @@ HTTPResponse Objects
Reason phrase returned by server.
Reason phrase returned by server.
.. attribute:: HTTPResponse.debuglevel
A debugging hook. If `debuglevel` is greater than zero, messages
will be printed to stdout as the response is read and parsed.
Examples
Examples
--------
--------
...
@@ -505,3 +516,14 @@ Here is an example session that shows how to ``POST`` requests::
...
@@ -505,3 +516,14 @@ Here is an example session that shows how to ``POST`` requests::
>>> data = response.read()
>>> data = response.read()
>>> conn.close()
>>> conn.close()
.. _httpmessage-objects:
HTTPMessage Objects
-------------------
An :class:`http.client.HTTPMessage` instance holds the headers from an
HTTP response. It is implemented using the
:class:`email.message.Message' class.
XXX Define the methods that clients can depend upon between versions.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment