Skip to content
Advertisement

aiohttp has different response to http.client in Python request to API

Context:

This works:

JavaScript

This does not. It returns { 'error':'invalid_client' }.

JavaScript

Question:

I cannot understand what the difference is between them. Any ideas what might be happening?

I’ve also tried:

  • Adding headers to the ClientSession(headers=headers) too.
  • Using the URL and removing params

Other notes:

Advertisement

Answer

in docs:

for GET query

JavaScript

for POST body

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement