-
Notifications
You must be signed in to change notification settings - Fork 17
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
Replace token query with header attribute #51
Conversation
4742696
to
e035c09
Compare
e035c09
to
719d428
Compare
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.
For future readability, you should duplicate the content of the commit message within the PR.
self._session = aiohttp.ClientSession(connector=connector, **session_kwargs) | ||
|
||
async def _request(self, callback, method, uri, data=None, connections_timeout=None): | ||
async def _request(self, callback, method, uri, data=None, connections_timeout=None, **kwargs): |
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.
shouldn't we explicitly pass and propagate a "headers" argument instead?
kwargs is quite lax, consequently you won't be able to do that for another use-case in the future.
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.
agree
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.
@mbrulatout any blocker on this?
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.
Nope, it just got lost.
Not sure about the scope of the comment though. Is it line/file specific or global ?
Assuming it's about getting rid of **kwargs everywhere it's been introduced, I'm not a big fan.
I suppose we could keep the **kwargs up to the get/put/post/delete, which would be in charge of building and passing the "headers" arg to _request(...)
See : https://developer.hashicorp.com/consul/api-docs/api-structure The "?token=" query parameter is deprecated and will be removed in Consul 1.17.
719d428
to
fe674b6
Compare
rebase only, comments haven't been processed |
See : https://developer.hashicorp.com/consul/api-docs/api-structure
The "?token=" query parameter is deprecated and will be removed in Consul 1.17.