Exemplo n.º 1
0
 void Start()
 {
     ObservableWebRequest
     .Get("https://unity.com/")
     .Subscribe(x => {
         Debug.Log(x);
     })
     .AddTo(this);
 }
Exemplo n.º 2
0
    IObservable <string> GetData(string root, Dictionary <string, string> query)
    {
        string url = serverUrl + root + "/" + "?key=" + key;

        foreach (KeyValuePair <string, string> item in query)
        {
            url += "&" + item.Key + "=" + item.Value;
        }
        Debug.Log(url);
        return(ObservableWebRequest.Get(url));
    }