-
Notifications
You must be signed in to change notification settings - Fork 45
Feat/http client factory #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| return _HTTPClient(middlewares=middlewares) | ||
|
|
||
|
|
||
| class _HTTPClient(Session): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_HTTPClient [](start = 6, length = 11)
shouldn't this just be HTTPClient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python compensates for lack of access modifiers with prefixing private fields/classes with an underscore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so your intent here is that everything is always called through the factory and there are no guarantees made that _HTTPClient wouldn't break in some non-compatible way. I see your point but at the same time callers will work directly against this class and it's not completely abstracted in the library so there'd be some back compat expectations.
Overview
The
HTTPClientFactorycreates an instance ofrequestswith;https://graph.microsoft.com/v1.0How the API works
Support for proxies
GZIP compression
Not supported out of the box, will be implemented as a middleware
Enforcing TLS 1.2
Can be done through a HTTPAdapter.
https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/
Tracked in #2