public static Task <IHttpResponse> PutAsync <TInput>(this IHttpSendTypedRequest source, TInput input, CancellationToken cancellationToken = default) { return(source.SendAsync(HttpMethod.Put, input, Constants.ContentTypeJson, cancellationToken)); }
public static Task <IHttpResponse> PostAsync(this IHttpSendTypedRequest source, CancellationToken cancellationToken = default) { return(source.SendAsync(HttpMethod.Post, cancellationToken)); }
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)); }
/// <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)); }