WebClient and WebRequest are available in Unity and seem to work only with the Pro Unity version, like any other API from the System.Net namespace. I donโt know if this restriction has changed in Unity 5. They support all these soothing calls mentioned in your question.
Unity Added a new API called UnityWebRequest in version 5.2 with support for the 5.3 mobile platform. It was designed to replace WWW and supports all other calls listed in your question. Below are examples for each of them. This is not a complete example. You can find complete examples in the link above.
//Get UnityWebRequest get = UnityWebRequest.Get("http://www.myserver.com/foo.txt"); //Post UnityWebRequest post = UnityWebRequest.Post("http://www.myserver.com/foo.txt","Hello"); //Put byte[] myData = System.Text.Encoding.UTF8.GetBytes("This is some test data"); UnityWebRequest put = UnityWebRequest.Put("http://www.my-server.com/upload", myData); //Delete UnityWebRequest delete = UnityWebRequest.Delete("http://www.myserver.com/foo.txt");
You can see a complete example for everyone, including posting with json here .
source share