Hi:
I need to set "Content-Type" to "application/json;charset=UTF-8" for a POST request to a 3rd party API.
How do I do this. It's not clear in the API doc.
cheers
Matt
Matt,
If you are using the NetworkRequest from AppStudio AppFramework, then you can set it like this,
networkRequest.headers["Content-Type"] = "application/json;charset=UTF-8";
This is documented on this API-Guide link (scroll all the way to the bottom), Work with networking services—AppStudio for ArcGIS | ArcGIS
Thank you,
Erwin.
It would be helpful to have this info here as well:
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.