Example #1
0
 public static IObservable <string> Post(string url, WWWForm content, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <string>((IObserver <string> observer, CancellationToken cancellation) => ObservableWWW.FetchText(new WWW(url, content), observer, progress, cancellation)));
 }
Example #2
0
 public static IObservable <string> Get(string url, Dictionary <string, string> headers = null, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <string>((IObserver <string> observer, CancellationToken cancellation) => ObservableWWW.FetchText(new WWW(url, null, headers ?? new Dictionary <string, string>()), observer, progress, cancellation)));
 }
Example #3
0
 public static IObservable <string> Post(string url, byte[] postData, Dictionary <string, string> headers, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <string>((IObserver <string> observer, CancellationToken cancellation) => ObservableWWW.FetchText(new WWW(url, postData, headers), observer, progress, cancellation)));
 }
        public static IObservable <string> Post(string url, WWWForm content, Dictionary <string, string> headers, IProgress <float> progress = null)
        {
            Dictionary <string, string> contentHeaders = content.headers;

            return(Observable.FromCoroutine <string>((IObserver <string> observer, CancellationToken cancellation) => ObservableWWW.FetchText(new WWW(url, content.data, ObservableWWW.MergeHash(contentHeaders, headers)), observer, progress, cancellation)));
        }