예제 #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));
 }
예제 #3
0
        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));
 }
예제 #5
0
        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)));
        }