コード例 #1
0
 public static IObservable <byte[]> PostAndGetBytes(string url, WWWForm content, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <byte[]>((IObserver <byte[]> observer, CancellationToken cancellation) => ObservableWWW.FetchBytes(new WWW(url, content), observer, progress, cancellation)));
 }
コード例 #2
0
        public static IObservable <byte[]> PostAndGetBytes(string url, WWWForm content, Dictionary <string, string> headers, IProgress <float> progress = null)
        {
            Dictionary <string, string> contentHeaders = content.get_headers();

            return(Observable.FromCoroutine <byte[]>((IObserver <byte[]> observer, CancellationToken cancellation) => ObservableWWW.FetchBytes(new WWW(url, content.get_data(), ObservableWWW.MergeHash(contentHeaders, headers)), observer, progress, cancellation)));
        }
コード例 #3
0
 public static IObservable <byte[]> PostAndGetBytes(string url, byte[] postData, Dictionary <string, string> headers, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <byte[]>((IObserver <byte[]> observer, CancellationToken cancellation) => ObservableWWW.FetchBytes(new WWW(url, postData, headers), observer, progress, cancellation)));
 }