Пример #1
0
        public static IObservable <WWW> PostWWW(string url, WWWForm content, Dictionary <string, string> headers, IProgress <float> progress = null)
        {
            Dictionary <string, string> contentHeaders = content.get_headers();

            return(Observable.FromCoroutine <WWW>((IObserver <WWW> observer, CancellationToken cancellation) => ObservableWWW.Fetch(new WWW(url, content.get_data(), ObservableWWW.MergeHash(contentHeaders, headers)), observer, progress, cancellation)));
        }
Пример #2
0
 public static IObservable <AssetBundle> LoadFromCacheOrDownload(string url, int version, uint crc, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <AssetBundle>((IObserver <AssetBundle> observer, CancellationToken cancellation) => ObservableWWW.FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, version, crc), observer, progress, cancellation)));
 }
Пример #3
0
 public static IObservable <WWW> PostWWW(string url, WWWForm content, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <WWW>((IObserver <WWW> observer, CancellationToken cancellation) => ObservableWWW.Fetch(new WWW(url, content), observer, progress, cancellation)));
 }
Пример #4
0
 public static IObservable <WWW> PostWWW(string url, byte[] postData, Dictionary <string, string> headers, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <WWW>((IObserver <WWW> observer, CancellationToken cancellation) => ObservableWWW.Fetch(new WWW(url, postData, headers), observer, progress, cancellation)));
 }
Пример #5
0
 public static IObservable <byte[]> PostAndGetBytes(string url, byte[] postData, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <byte[]>((IObserver <byte[]> observer, CancellationToken cancellation) => ObservableWWW.FetchBytes(new WWW(url, postData), observer, progress, cancellation)));
 }
Пример #6
0
 public static IObservable <WWW> GetWWW(string url, Dictionary <string, string> headers = null, IProgress <float> progress = null)
 {
     return(Observable.FromCoroutine <WWW>((IObserver <WWW> observer, CancellationToken cancellation) => ObservableWWW.Fetch(new WWW(url, null, headers ?? new Dictionary <string, string>()), observer, progress, cancellation)));
 }
Пример #7
0
        public static IObservable <byte[]> PostAndGetBytes(string url, WWWForm content, Dictionary <string, string> headers, IProgress <float> progress = null)
        {
            Dictionary <string, string> contentHeaders = content.headers;

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