You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we've got a nicely spec'ed Transport API we can give our users some pretty neat flexibility, but I think there's also one place where we've maybe got a gap we'd like to plug?...
Something that's important for us is to be able to easily demonstrate to our users how to drop down to lower levels of abstraction in the API when needed, for example it'd be really helpful how to instantiate a client directly with an httpcore connection pool...
That's really valuable because it helps an understanding of how the pieces fit together, and also allows us to do stuff like add some low-level connection options on httpcore, without necessarily having to expose those all the way through to httpx. (Eg encode/httpcore#88)
However, the one bit that's missing is that there currently isn't any convenient way for our users to generate an appropriately configured SSLContext without digging into the gnarly details.
I think we might well want to expose a stand alone function to provide users with our "generate an SSL context" functionality, like so...
ssl_context=httpx.create_ssl_context() # Accepts the standard 'verify', 'cert', trust_env' arguments.
Which then gives our users everything they need to directly plug in a properly configured httpcore connection pool...
And then expose the function at the top-level init.
Incidentally I think our SSLConfig instances our now a bit of a vestige of past designs, and we could probably internally use the same create_ssl_context inside the client implementation, rather than hanging on to the intermediary config instance.
The text was updated successfully, but these errors were encountered:
Now that we've got a nicely spec'ed Transport API we can give our users some pretty neat flexibility, but I think there's also one place where we've maybe got a gap we'd like to plug?...
Something that's important for us is to be able to easily demonstrate to our users how to drop down to lower levels of abstraction in the API when needed, for example it'd be really helpful how to instantiate a client directly with an
httpcore
connection pool...That's really valuable because it helps an understanding of how the pieces fit together, and also allows us to do stuff like add some low-level connection options on
httpcore
, without necessarily having to expose those all the way through tohttpx
. (Eg encode/httpcore#88)However, the one bit that's missing is that there currently isn't any convenient way for our users to generate an appropriately configured SSLContext without digging into the gnarly details.
I think we might well want to expose a stand alone function to provide users with our "generate an SSL context" functionality, like so...
Which then gives our users everything they need to directly plug in a properly configured
httpcore
connection pool...Implementation-wise this'd just be...
And then expose the function at the top-level init.
Incidentally I think our
SSLConfig
instances our now a bit of a vestige of past designs, and we could probably internally use the samecreate_ssl_context
inside the client implementation, rather than hanging on to the intermediary config instance.The text was updated successfully, but these errors were encountered: