Im using HttpWebRequest in Unity 5.3. Everything works as expected, for the first time at least. Every second attempt freezes the Unity editor. Why is this working only once?
Here is my code:
StreamWriter writer = new StreamWriter(request.GetRequestStream());
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
StreamReader responseStream = new StreamReader(response.GetResponseStream(), enc);
responseData = responseStream.ReadToEnd();