示例#1
0
 public static HttpRequestBuilder CreateDelete(string url)
 {
     return(HttpRequestBuilder.CreatePrototype("DELETE", url));
 }
示例#2
0
 public static HttpRequestBuilder CreatePatch(string url)
 {
     return(HttpRequestBuilder.CreatePrototype("PATCH", url));
 }
        public static IEnumerator Post <T>(this IHttpClient client, string url, T body, ResultCallback callback)
        {
            IHttpRequest request = HttpRequestBuilder.CreatePost(url).WithBearerAuth().WithJsonBody(body).GetResult();

            return(client?.SendRequest(request, HttpClientExtension.CreateResponseHandler(callback)));
        }
示例#4
0
 public static HttpRequestBuilder CreatePut(string url)
 {
     return(HttpRequestBuilder.CreatePrototype("PUT", url));
 }
        public static IEnumerator Get <T, R>(this IHttpClient client, string url, T queries, ResultCallback <R> callback)
        {
            IHttpRequest request = HttpRequestBuilder.CreateGet(url).WithBearerAuth().WithQueries(queries).GetResult();

            return(client?.SendRequest(request, HttpClientExtension.CreateResponseHandler(callback)));
        }