mureq
mureq copied to clipboard
support a callback for creating the connection
Right now, _prepare_request initializes (but doesn't connect) either a HTTPConnection, an HTTPSConnection, or an UnixHTTPConnection depending on the URL and other parameters. If we added a optional callback arg that could construct the connection, we could potentially support a number of tricky use cases (similar to the "adapter" functionality in Requests): SO_REUSEPORT, SOCKS proxies, and others.