MCPcopy Index your code
hub / github.com/python/cpython / http_open

Method http_open

Lib/test/test_urllib2.py:551–555  ·  view source on GitHub ↗
(self, req)

Source from the content-addressed store, hash-verified

549 self.has_auth_header = False
550
551 def http_open(self, req):
552 if req.has_header('Authorization'):
553 self.has_auth_header = True
554 name = http.client.responses[self.code]
555 return MockResponse(self.code, name, MockFile(), "", req.get_full_url())
556
557
558

Callers

nothing calls this directly

Calls 4

MockResponseClass · 0.85
get_full_urlMethod · 0.80
MockFileClass · 0.70
has_headerMethod · 0.45

Tested by

no test coverage detected