の下Python 3.3/Lib/urllib/request.py、クラス内、 1252AbstractHTTPHandler(BaseHandler)行目
h.request(req.get_method(), req.selector, req.data, headers)
Python 3.3/Lib/http/client.pyin classの下HTTPConnectionの次の行:
1047号線
def リクエスト (自己、メソッド、URL、本文 = なし、ヘッダー = {}):
1068号線
def _send_request (自己、メソッド、URL、本文、ヘッダー):
1087号線
self.endheaders(本体)
body の上と req.data は、 で呼び出すと、同じ文字列または他のデータに対応urllib.request.urlopen(req, data)しrequest(method, url, body=None, headers={})ますhttp.client.HTTPConnection。
これは、次の 2 つが同じであることを意味しますか? (ドキュメントでは同じではないようです)
HTTPConnection.endheaders(data)HTTPConnection.endheaders()、HTTPConnection.send(data)
私は完全に混乱しています。