public Task <TResponse> CustomMethodAsync <TResponse>(string httpVerb, string relativeOrAbsoluteUrl, object request) { if (!HttpMethods.Exists(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } var requestBody = HttpUtils.HasRequestBody(httpVerb) ? request : null; return(SendAsync <TResponse>(httpVerb, ResolveUrl(httpVerb, relativeOrAbsoluteUrl), requestBody)); }
public Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto) { if (!HttpMethods.Exists(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } var requestBody = HttpUtils.HasRequestBody(httpVerb) ? requestDto : null; return(SendAsync <byte[]>(httpVerb, ResolveTypedUrl(httpVerb, requestDto), requestBody)); }