コード例 #1
0
 public static Task <IHttpResponse> PutAsync <TInput>(this IHttpSendTypedRequest source, TInput input, CancellationToken cancellationToken = default)
 {
     return(source.SendAsync(HttpMethod.Put, input, Constants.ContentTypeJson, cancellationToken));
 }
コード例 #2
0
 public static Task <IHttpResponse> PostAsync(this IHttpSendTypedRequest source, CancellationToken cancellationToken = default)
 {
     return(source.SendAsync(HttpMethod.Post, cancellationToken));
 }
コード例 #3
0
 public static Task <IHttpResponse <TContent> > PostAsync <TInput, TContent>(this IHttpSendTypedRequest source, TInput input, string contentType, CancellationToken cancellationToken = default)
 {
     return(source.SendAsync <TInput, TContent>(HttpMethod.Post, input, contentType, cancellationToken));
 }
コード例 #4
0
 /// <summary>
 /// Send a http DELETE request and return response with statuscode and TContent which deserialized from http rresponse content
 /// </summary>
 /// <typeparam name="TContent"></typeparam>
 /// <param name="source"></param>
 /// <param name="cancellationToken"></param>
 /// <returns></returns>
 public static Task <IHttpResponse <TContent> > DeleteAsync <TContent>(this IHttpSendTypedRequest source, CancellationToken cancellationToken = default)
 {
     return(source.SendAsync <TContent>(HttpMethod.Delete, cancellationToken));
 }