private ResponseInfo Do(string method, Object body) { Request = HTTP.CreateRequest(Url, method, body, RequestOptions); return(HTTP.Send(Request)); }
private Task <ResponseInfo> DoAsync(string method, Object body) { Request = HTTP.CreateRequest(Url, method, body); return(HTTP.SendAsync(Request)); }
/// <summary> /// async send the http request /// </summary> /// <param name="requestInto"></param> /// <returns></returns> public static Task <ResponseInfo> SendAsync(this RequestInfo requestInto) { return(HTTP.SendAsync(requestInto)); }
/// <summary> /// create a RequestInfo object base on this str . /// </summary> /// <param name="str"></param> /// <param name="mehtod">GET method is default </param> /// <returns></returns> public static RequestInfo AsHttp(this string str, string mehtod = "GET", object body = null) { var req = HTTP.CreateRequest(str, mehtod, body); return(req); }
/// <summary> /// send the http request /// </summary> /// <param name="requestInto"></param> /// <returns></returns> public static ResponseInfo Send(this RequestInfo requestInto) { return(HTTP.Send(requestInto)); }