Closed FeelsBadMan1 closed 3 years ago
You miss one field in headers:
accept
: application/json
import requests
requests.get("https://foaas.com/absolutely/discorduser/a%20really%20cool%20person").json() # raise similar exception
requests.get("https://foaas.com/absolutely/discorduser/a%20really%20cool%20person", headers={"accept": "application/json"}).json() # return valid json
thank u, That solved the issure i had ;D as of solved now im closing this issue
Hello, somehow the api not returns json objects but text instead. here is what i did:
request url: https://foaas.com/absolutely/discorduser/a really cool person response error: raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://foaas.com/absolutely/discorduser/a%20really%20cool%20person')