This is a tough one. The way I got around it was using a custom Uploader using UnityWebRequest.
Something like below:
UnityWebRequest webRequest = new UnityWebRequest(, "POST");
byte[] encodedPayload = new System.Text.UTF8Encoding().GetBytes();
webRequest.uploadHandler = (UploadHandler) new UploadHandlerRaw(encodedPayload);
webRequest.downloadHandler = (DownloadHandler) new DownloadHandlerBuffer();
webRequest.SetRequestHeader("Content-Type", "application/json");
webRequest.SetRequestHeader("cache-control", "no-cache");
UnityWebRequestAsyncOperation requestHandel = webRequest.SendWebRequest();
requestHandel.completed += delegate(AsyncOperation pOperation) {
Debug.Log(webRequest.responseCode);
Debug.Log(webRequest.downloadHandler.text);
};
↧