Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
(self, url: str)
| 490 | return headers |
| 491 | |
| 492 | def _prepare_url(self, url: str) -> URL: |
| 493 | """ |
| 494 | Merge a URL argument together with any 'base_url' on the client, |
| 495 | to create the URL used for the outgoing request. |
| 496 | """ |
| 497 | # Copied from httpx's `_merge_url` method. |
| 498 | merge_url = URL(url) |
| 499 | if merge_url.is_relative_url: |
| 500 | merge_raw_path = self.base_url.raw_path + merge_url.raw_path.lstrip(b"/") |
| 501 | return self.base_url.copy_with(raw_path=merge_raw_path) |
| 502 | |
| 503 | return merge_url |
| 504 | |
| 505 | def _make_sse_decoder(self) -> SSEDecoder | SSEBytesDecoder: |
| 506 | return SSEDecoder() |