Returns the transport instance that should be used for a given URL. This will either be the standard connection pool, or a proxy.
(self, url: URL)
| 758 | ) |
| 759 | |
| 760 | def _transport_for_url(self, url: URL) -> BaseTransport: |
| 761 | class="st">""" |
| 762 | Returns the transport instance that should be used for a given URL. |
| 763 | This will either be the standard connection pool, or a proxy. |
| 764 | class="st">""" |
| 765 | for pattern, transport in self._mounts.items(): |
| 766 | if pattern.matches(url): |
| 767 | return self._transport if transport is None else transport |
| 768 | |
| 769 | return self._transport |
| 770 | |
| 771 | def request( |
| 772 | self, |