Given a URL string, return the origin in the raw tuple format that `httpcore` uses for it's representation.
(url: str)
| 5 | |
| 6 | |
| 7 | def url_to_origin(url: str) -> httpcore.URL: |
| 8 | class="st">""" |
| 9 | Given a URL string, return the origin in the raw tuple format that |
| 10 | `httpcore` uses for it&class="cm">#x27;s representation. |
| 11 | class="st">""" |
| 12 | u = httpx.URL(url) |
| 13 | return httpcore.URL(scheme=u.raw_scheme, host=u.raw_host, port=u.port, target=class="st">"/") |
| 14 | |
| 15 | |
| 16 | def test_socks_proxy(): |
no outgoing calls
no test coverage detected