Beispiel #1
0
 public static async Task DeleteAsync(this ClientBase client, string relativeUrl, NameValueCollection queryStringValues, Func <HttpStatusCode, string, Exception> throwCustomException = null)
 {
     using (var request = client.CreateRequest(HttpMethod.Delete, relativeUrl, queryStringValues)) {
         await client.Invoke(request, throwCustomException);
     }
 }
Beispiel #2
0
 public static async Task <string> PostAsync <TIn>(this ClientBase client, string relativeUrl, NameValueCollection queryStringValues, TIn input, Func <HttpStatusCode, string, Exception> throwCustomException = null)
 {
     using (var request = client.CreateJsonRequest <TIn>(HttpMethod.Post, relativeUrl, queryStringValues, input)) {
         return(await client.Invoke(request, throwCustomException));
     }
 }
Beispiel #3
0
 public static async Task <string> PatchAsync(this ClientBase client, string relativeUrl, NameValueCollection queryStringValues, string input, Func <HttpStatusCode, string, Exception> throwCustomException = null)
 {
     using (var request = client.CreateStringRequest(HttpPatchMethod, relativeUrl, queryStringValues, input)) {
         return(await client.Invoke(request, throwCustomException));
     }
 }