The URL path as a string. Excluding the query string, and URL decoded. For example: url = httpx.URL("https://example.com/pa%20th") assert url.path == "/pa th"
(self)
| 243 | |
| 244 | @property |
| 245 | def path(self) -> str: |
| 246 | """ |
| 247 | The URL path as a string. Excluding the query string, and URL decoded. |
| 248 | |
| 249 | For example: |
| 250 | |
| 251 | url = httpx.URL("https://example.com/pa%20th") |
| 252 | assert url.path == "/pa th" |
| 253 | """ |
| 254 | path = self._uri_reference.path or "/" |
| 255 | return unquote(path) |
| 256 | |
| 257 | @property |
| 258 | def query(self) -> bytes: |