Setting content type for maxurl request

Misemao's icon

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.

lichess_api_request.maxpat
Max Patch
This is a simple example for my problem,

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.