public static IHttpObservable Post(this IHttpClient http, Uri url, HttpContent content) => HttpObservable.Return(ho => // TODO Use DeferAsync Observable.Defer(() => SendAsync(http, ho.Configurer(http.Config), 0, HttpMethod.Post, url, content, ho.Options) .ToObservable() .Select(f => f.WithConfig(http.Config.WithCookies(f.Client.Config.Cookies)))));
static IHttpObservable Submit(IObservable <HttpFetch <ParsedHtml> > query, string formSelector, int?formIndex, Uri url, NameValueCollection data) => HttpObservable.Return( from html in query select Submit(html.Client, html.Content, formSelector, formIndex, url, data));
internal static IHttpObservable Submit(this IObservable <HttpFetch <ParsedHtml> > query, string formSelector, int?formIndex, Uri url, ISubmissionData <Unit> data) => HttpObservable.Return( from html in query select Submit(html.Client, html.Content, formSelector, formIndex, url, _ => data));
public static IHttpObservable Post(this IHttpObservable query, Uri url, HttpContent content) => HttpObservable.Return( from f in query select f.Client.Post(url, content));
public static IHttpObservable Post(this IHttpObservable query, Uri url, NameValueCollection data) => HttpObservable.Return( from f in query select f.Client.Post(url, data));
public static IHttpObservable Get(this IHttpClient http, Uri url) => HttpObservable.Return(ho => // TODO Use DeferAsync Observable.Defer(() => SendAsync(http, ho.Configurer(http.Config), 0, HttpMethod.Get, url, options: ho.Options) .ToObservable()));
public static IHttpObservable Get(this IHttpObservable query, Uri url) => HttpObservable.Return( from first in query select first.Client.Get(url));