add_headers() — requests Function Reference
Architecture documentation for the add_headers() function in adapters.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD d00652e5_18d7_14ca_83b8_481002b86341["add_headers()"] 5fdf5d52_8295_768a_e20f_c6cefb721b91["HTTPAdapter"] d00652e5_18d7_14ca_83b8_481002b86341 -->|defined in| 5fdf5d52_8295_768a_e20f_c6cefb721b91 66fc1563_b020_b369_a505_bc9abe7cf66d["send()"] 66fc1563_b020_b369_a505_bc9abe7cf66d -->|calls| d00652e5_18d7_14ca_83b8_481002b86341 66fc1563_b020_b369_a505_bc9abe7cf66d["send()"] d00652e5_18d7_14ca_83b8_481002b86341 -->|calls| 66fc1563_b020_b369_a505_bc9abe7cf66d style d00652e5_18d7_14ca_83b8_481002b86341 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/adapters.py lines 557–569
def add_headers(self, request, **kwargs):
"""Add any headers needed by the connection. As of v2.0 this does
nothing by default, but is left for overriding by users that subclass
the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
:param kwargs: The keyword arguments from the call to send().
"""
pass
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does add_headers() do?
add_headers() is a function in the requests codebase, defined in src/requests/adapters.py.
Where is add_headers() defined?
add_headers() is defined in src/requests/adapters.py at line 557.
What does add_headers() call?
add_headers() calls 1 function(s): send.
What calls add_headers()?
add_headers() is called by 1 function(s): send.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free