get_full_url() — requests Function Reference
Architecture documentation for the get_full_url() function in cookies.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 63cf6778_9f88_2740_3c09_2b2c4c8e761c["get_full_url()"] ad93b63e_dc2f_11b4_dbba_995ffe6bcf13["MockRequest"] 63cf6778_9f88_2740_3c09_2b2c4c8e761c -->|defined in| ad93b63e_dc2f_11b4_dbba_995ffe6bcf13 b59a42f3_d82f_81a3_c550_b1cea1222004["get()"] 63cf6778_9f88_2740_3c09_2b2c4c8e761c -->|calls| b59a42f3_d82f_81a3_c550_b1cea1222004 0ab29509_59a1_1f68_fae2_146376240019["to_native_string()"] 63cf6778_9f88_2740_3c09_2b2c4c8e761c -->|calls| 0ab29509_59a1_1f68_fae2_146376240019 style 63cf6778_9f88_2740_3c09_2b2c4c8e761c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/cookies.py lines 49–67
def get_full_url(self):
# Only return the response's URL if the user hadn't set the Host
# header
if not self._r.headers.get("Host"):
return self._r.url
# If they did set it, retrieve it and reconstruct the expected domain
host = to_native_string(self._r.headers["Host"], encoding="utf-8")
parsed = urlparse(self._r.url)
# Reconstruct the URL as we expect it
return urlunparse(
[
parsed.scheme,
host,
parsed.path,
parsed.params,
parsed.query,
parsed.fragment,
]
)
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does get_full_url() do?
get_full_url() is a function in the requests codebase, defined in src/requests/cookies.py.
Where is get_full_url() defined?
get_full_url() is defined in src/requests/cookies.py at line 49.
What does get_full_url() call?
get_full_url() calls 2 function(s): get, to_native_string.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free