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
Specifically for signing requests to cryptocurrency exchange apis I need the body to be available in the request object.
Edit:
The body is generated here, but isn't added as an attribute of the request object.
# handle building the request body, if any
body = ''
if any((self.data, self.files, self.json is not None)):
content_type, content_len, body = await self._formulate_body()
asks_headers['Content-Type'] = content_type
asks_headers['Content-Length'] = content_len
Currently,
asks
supports extensible authz/authn:https://asks.readthedocs.io/en/latest/overview-of-funcs-and-args.html#authing
https://github.com/theelous3/asks/blob/master/asks/auth.py
It is possible to inherit from
AuthBase
to introduce missing auth methods.Unfortunately,
asks.auth.AuthBase
is not compatible withrequests.auth.AuthBase
:http://docs.python-requests.org/en/master/user/authentication/#new-forms-of-authentication
It would be awesome if existing non-trivial
requests
auth plugins could be used withasks
as well.For example:
https://github.com/lepture/authlib/blob/dee7f003b74252e22d62e11a91ec1b629b6fdeae/authlib/client/oauth2_session.py#L22-L34
The text was updated successfully, but these errors were encountered: