Skip to content

Instantly share code, notes, and snippets.

@solancer
Created February 17, 2022 07:48
Show Gist options
  • Save solancer/979f36205dd5dc17e3841f39618aec67 to your computer and use it in GitHub Desktop.
Save solancer/979f36205dd5dc17e3841f39618aec67 to your computer and use it in GitHub Desktop.
unity
UnityWebRequest www = UnityWebRequest.Put(URL_01, "{\"name\":\"user_01\",\"address\":{\"raw\":\"MountFiji\"}}");
www.SetRequestHeader ("Content-Type", "application/json");
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Form upload complete!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment