I am currently running into an issue with my code where I have to send JSON to post an API, but when I send JSON it always says it is receiving text.
I am currently running into an issue with my code where I have to send JSON to post an API, but when I send JSON it always says it is receiving text.
You might need to add a content-type header like in the screenshot here: Cannot set API header for Content-Type
I had a similar issue with another API. The fix was to add ‘Content-Type’ and ‘accept’ headers to the call, with the text of both set to ‘application/json’.
Can you see an example successful call on the API website for example? It’ll show you what the various elements of a successful call are.
What is the link to that?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.