Exemplo n.º 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)));
        }
Exemplo n.º 2
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)));
        }