MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / host

Method host

mitmproxy/http.py:707–717  ·  view source on GitHub ↗

Target server for this request. This may be parsed from the raw request (e.g. from a ``GET http://example.com/ HTTP/1.1`` request line) or inferred from the proxy mode (e.g. an IP in transparent mode). Setting the host attribute also updates the host header and auth

(self)

Source from the content-addressed store, hash-verified

705
706 @property
707 def host(self) -> str:
708 """
709 Target server for this request. This may be parsed from the raw request
710 (e.g. from a ``GET http://example.com/ HTTP/1.1`` request line)
711 or inferred from the proxy mode (e.g. an IP in transparent mode).
712
713 Setting the host attribute also updates the host header and authority information, if present.
714
715 *See also:* `Request.authority`, `Request.host_header`, `Request.pretty_host`
716 """
717 return self.data.host
718
719 @host.setter
720 def host(self, val: str | bytes) -> None:

Callers

nothing calls this directly

Calls 2

always_strFunction · 0.90

Tested by

no test coverage detected