Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
(self, url: str)
| 455 | return headers |
| 456 | |
| 457 | def _prepare_url(self, url: str) -> URL: |
| 458 | """ |
| 459 | Merge a URL argument together with any 'base_url' on the client, |
| 460 | to create the URL used for the outgoing request. |
| 461 | """ |
| 462 | # Copied from httpx's `_merge_url` method. |
| 463 | merge_url = URL(url) |
| 464 | if merge_url.is_relative_url: |
| 465 | merge_raw_path = self.base_url.raw_path + merge_url.raw_path.lstrip(b"/") |
| 466 | return self.base_url.copy_with(raw_path=merge_raw_path) |
| 467 | |
| 468 | return merge_url |
| 469 | |
| 470 | def _make_sse_decoder(self) -> SSEDecoder | SSEBytesDecoder: |
| 471 | return SSEDecoder() |