API POST call works in POSTMAN but not in Unity

Hey everyone. In my project, after a player inputs their first name, last name, and email address, an API POST call is made sending these strings after being saved in variables. I have tested this call in POSTMAN and it works fine, but in Unity it gives me a “Generic / Unknown HTTP Error.”

IEnumerator AWSCall(){

 		WWWForm test_form = new WWWForm();
 		test_form.AddField("first_name", fName);
 		test_form.AddField("last_name", lName);
 		test_form.AddField("email_address", eMail);

 		using (var w = UnityWebRequest.Post(AWS_URL, test_form)){

 			yield return w.Send();
 			if(w.isNetworkError || w.isHttpError){


 				print("Transfer Complete");

Anyone know what could be the issue? Thanks!

It looks like it’s a bag

I changed my methods from WWW to UnityWebRequest like this:

 IEnumerator Post()
            string postData = "{....post data json...}";
            byte[] bytes = GetBytes(postData);
            using (UnityWebRequest www = UnityWebRequest.Put("http://localhost/api/PutMethod", rawData))
    			www.SetRequestHeader("Content-Type", "application/json");
    			www.SetRequestHeader ("Accept", "text/json");
    			yield return www.Send();
    			if (www.isNetworkError)

Hey guys, I am trying to invoke a Web Service in Unity, it requires first an access token that i’ll get it from this API : https://api.cognitive.microsoft.com/sts/v1.0/issueToken.
I order to recieve the access token, I should use a POST request with a Ocp-Apim-Subscription-Key as a header and no data will be passed in the HTTP body, it works correctly with Postman, but in Unity, i get this Error :

Error is : Generic/unknown HTTP error
<RequestToken>c__Iterator0:MoveNext() (at Assets/Scripts/Test.cs:26)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

This is my code :

using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public class Test : MonoBehaviour
    public static readonly string accessUri = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken";
    private string apiKey;
    private string accessToken;

    public void Doo ()

    public IEnumerator RequestToken()
        UnityWebRequest request = new UnityWebRequest(accessUri, UnityWebRequest.kHttpVerbPOST);
        request.SetRequestHeader("Ocp-Apim-Subscription-Key", "a66ec1e2efed47639f22e2dc2e760d13x");

        yield return request.SendWebRequest();

        if (request.isNetworkError || request.isHttpError)
            Debug.Log("Error is : " + request.error);
            Debug.Log("downloadHandler Text : " + request.downloadHandler.text);
            Debug.Log("responseCode : " + request.responseCode);
            Debug.Log("isDone : " + request.isDone);
            Debug.Log("method : " + request.method);

Hey @montacerdk did you find a solution to this? cheers!