Forum Discussion
YuriK
Khoros Expert
Can you paste a sample response that you get from the API call here? I'd like to check if JSON parsing is failing here. Also, please check the Content-Type header of the API response is returned as "application/json".
You can also try to remove the .json() and print out the response string to see if you are at least able to get a response at all.
perk
10 years agoAdept
Heyt YuriK,
The sample JSON response would be: {"users":[],"next_page":null,"previous_page":null,"count":0} if you are do ?query=abc
How should I print out the response when I remove json() ? There is no console in Lithium for output and I am relatively new with freemarker.
The endpoint sets the right content-type:
Content-Type: application/json; charset=UTF-8
Thanks for your help!
Related Content
- 5 years ago