BewareMyPower opened a new issue #12334: URL: https://github.com/apache/pulsar/issues/12334
**Describe the bug** When a HTTP request is sent to an OAuth 2.0 server for an access token, the content type should be `x-www-form-urlencoded`. However, current C++ implementation uses `application/json` as the content type. Sometimes it works but for some strict validated OAuth 2.0 server, it could fail. **To Reproduce** Here are the error logs when sending a request whose content type is `application/json`. ``` ERROR [0x70000db06000] AuthOauth2:341 | Response failed for issuerurl https://login.microsoftonline.com/(xxx). response Code 400 passedin: ``` The error code is 400, which means bad request. **Expected behavior** The request's content type should be `x-www-form-urlencoded`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
