authlib icon indicating copy to clipboard operation
authlib copied to clipboard

HTTPX: add send method

Open lspgn opened this issue 2 years ago • 1 comments

Hello, Thank you for this library. In some cases documented by HTTPX, when using directly the send method, the bearer token is not passed. This change adds a method with a similar signature to request and stream with an auth parameter (those two can likely be removed too).

The only thing I have not fully tested is self.ensure_active_token(self.token) as it's in a non async function.

Thank you

What kind of change does this PR introduce? (check at least one)

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [x] No

  • [x] You consent that the copyright of your pull request source code belongs to Authlib's author.

lspgn avatar Jun 23 '23 06:06 lspgn

@lspgn thanks for your work. Maybe you need to add a test case for send method.

lepture avatar Jul 20 '23 12:07 lepture