Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting json into ?
#2
(Aug-16-2017, 07:40 PM)cmietzner Wrote: Unexpected content type received: text/html; charset=utf-8

To me, that looks like your content is right, but you're sending the wrong http header.  How you change that depends entirely on what framework you're using to send the http response.

For reference: https://developer.mozilla.org/en-US/docs...ntent-Type
Instead of text/html, you want to be sending application/json, so the whole http header would be Content-Type: application/json; charset=utf-8.
Reply


Messages In This Thread
converting json into ? - by cmietzner - Aug-16-2017, 07:40 PM
RE: converting json into ? - by nilamo - Aug-16-2017, 08:00 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020