title: REST in Unity (send messages from webserver to unity)
body: <p>Is there a way to have a simple webserver send messages to Unity? </p>
  
  <p>At the moment, we're doing a <code>GET</code> using <code>UnityWebRequest.Get()</code> in the update method. Here's the code:</p>
  
  <pre><code>// Update is called once per frame
  void Update () {
      StartCoroutine(GetData());
  }
  
  IEnumerator GetData()
  {
      UnityWebRequest uwr = UnityWebRequest.Get(url);
      yield return uwr.Send();
  
      if (uwr.isError)
      {
          Debug.Log(uwr.error);
      }else
      {
          Debug.Log((float.Parse(uwr.downloadHandler.text) / 100));
          fnumber = ((float.Parse(uwr.downloadHandler.text) / 100));
          transform.position.Set(oldX, fnumber, oldZ);
      }
  }
  </code></pre>
  
  <p>However, this throws this error: </p>
  
  <blockquote>
    <p>CANNOT RESOLVE DESTINATION HOST</p>
  </blockquote>
  
  <p>I found <a href="https://issuetracker.unity3d.com/issues/wsa-uwp-cannot-resolve-destination-host-when-using-unitywebrequest-on-master-build-on-wp10" rel="nofollow noreferrer">this</a> bug-report, which states, it would have been fixed, which doesn't seem so. </p>
  
  <p>So, is there a way to have the server send messages to Unity? </p>
  
  <p>Thanks</p>