MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / url

Method url

mitmproxy/http.py:793–802  ·  view source on GitHub ↗

The full URL string, constructed from `Request.scheme`, `Request.host`, `Request.port` and `Request.path`. Settings this property updates these attributes as well.

(self)

Source from the content-addressed store, hash-verified

791
792 @property
793 def url(self) -> str:
794 """
795 The full URL string, constructed from `Request.scheme`, `Request.host`, `Request.port` and `Request.path`.
796
797 Settings this property updates these attributes as well.
798 """
799 if self.first_line_format == "authority":
800 return f"{self.host}:{self.port}"
801 path = self.path if self.path != "*" else ""
802 return url.unparse(self.scheme, self.host, self.port, path)
803
804 @url.setter
805 def url(self, val: str | bytes) -> None:

Callers

nothing calls this directly

Calls 2

always_strFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected