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

Method add_header

Lib/urllib/request.py:369–371  ·  view source on GitHub ↗
(self, key, val)

Source from the content-addressed store, hash-verified

367 return self.selector == self.full_url
368
369 def add_header(self, key, val):
370 # useful for something like authentication
371 self.headers[key.capitalize()] = val
372
373 def add_unredirected_header(self, key, val):
374 # will not be added to a redirected request

Callers 6

test_custom_headersMethod · 0.95
test_redirectMethod · 0.95
__init__Method · 0.95
proxy_openMethod · 0.45

Calls 1

capitalizeMethod · 0.45

Tested by 4

test_custom_headersMethod · 0.76
test_redirectMethod · 0.76