MCPcopy
hub / github.com/psf/requests / add_headers

Method add_headers

src/requests/adapters.py:599–611  ·  view source on GitHub ↗

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 s

(self, request: PreparedRequest, **kwargs: Any)

Source from the content-addressed store, hash-verified

597 return url
598
599 def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None:
600 """Add any headers needed by the connection. As of v2.0 this does
601 nothing by default, but is left for overriding by users that subclass
602 the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
603
604 This should not be called from user code, and is only exposed for use
605 when subclassing the
606 :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
607
608 :param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
609 :param kwargs: The keyword arguments from the call to send().
610 """
611 pass
612
613 def proxy_headers(self, proxy: str) -> dict[str, str]:
614 """Returns a dictionary of the headers to add to any request sent

Callers 1

sendMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected