Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
(self, url: str)
| 480 | return headers |
| 481 | |
| 482 | def _prepare_url(self, url: str) -> URL: |
| 483 | """ |
| 484 | Merge a URL argument together with any 'base_url' on the client, |
| 485 | to create the URL used for the outgoing request. |
| 486 | """ |
| 487 | # Copied from httpx's `_merge_url` method. |
| 488 | merge_url = URL(url) |
| 489 | if merge_url.is_relative_url: |
| 490 | merge_raw_path = self.base_url.raw_path + merge_url.raw_path.lstrip(b"/") |
| 491 | return self.base_url.copy_with(raw_path=merge_raw_path) |
| 492 | |
| 493 | return merge_url |
| 494 | |
| 495 | def _make_sse_decoder(self) -> SSEDecoder | SSEBytesDecoder: |
| 496 | return SSEDecoder() |