Home / Function/ get_host() — requests Function Reference

get_host() — requests Function Reference

Architecture documentation for the get_host() function in cookies.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  12329c13_8fec_ecc4_a995_93e3e9a1b72d["get_host()"]
  ad93b63e_dc2f_11b4_dbba_995ffe6bcf13["MockRequest"]
  12329c13_8fec_ecc4_a995_93e3e9a1b72d -->|defined in| ad93b63e_dc2f_11b4_dbba_995ffe6bcf13
  3f0e9c17_865c_bf7a_d792_9b1cfe7b7a1b["get_origin_req_host()"]
  3f0e9c17_865c_bf7a_d792_9b1cfe7b7a1b -->|calls| 12329c13_8fec_ecc4_a995_93e3e9a1b72d
  94eff649_6d28_4daa_5fa3_4d7c305f0b1b["host()"]
  94eff649_6d28_4daa_5fa3_4d7c305f0b1b -->|calls| 12329c13_8fec_ecc4_a995_93e3e9a1b72d
  style 12329c13_8fec_ecc4_a995_93e3e9a1b72d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/requests/cookies.py lines 43–44

    def get_host(self):
        return urlparse(self._r.url).netloc

Domain

Subdomains

Frequently Asked Questions

What does get_host() do?
get_host() is a function in the requests codebase, defined in src/requests/cookies.py.
Where is get_host() defined?
get_host() is defined in src/requests/cookies.py at line 43.
What calls get_host()?
get_host() is called by 2 function(s): get_origin_req_host, host.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free