Setting content type for maxurl request
Jan 31 2023 | 12:57 pm
I am trying to get chess game data from the lichess.org public api. The api can either return thecontent as application/x-chess-png or as application/json. I need it as json, but sadly, the default seems to be png and I can't seem to get the maxurl oject to request json as a content type. I tried setting the content type in the headers using a dict for the request, but I still get png content back.
Can anyone tell me what I have to do to receive the content in application/json format?
Edit: This appears to be an issue with the lichess.org api, as I have the same problem using curl or Invoke-RestMethod from the command line.