Exemple #1
0
 private ResponseInfo Do(string method, Object body)
 {
     Request = HTTP.CreateRequest(Url, method, body, RequestOptions);
     return(HTTP.Send(Request));
 }
Exemple #2
0
 private Task <ResponseInfo> DoAsync(string method, Object body)
 {
     Request = HTTP.CreateRequest(Url, method, body);
     return(HTTP.SendAsync(Request));
 }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
        /// <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);
        }
Exemple #5
0
 /// <summary>
 /// send the http request
 /// </summary>
 /// <param name="requestInto"></param>
 /// <returns></returns>
 public static ResponseInfo Send(this RequestInfo requestInto)
 {
     return(HTTP.Send(requestInto));
 }