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.
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
It would be helpful to have this info here as well:
Retrieving data ...