public static HasVerb ( string httpVerb ) : bool | ||
httpVerb | string | |
Résultat | bool |
public virtual Task <TResponse> CustomMethodAsync <TResponse>(string httpVerb, object requestDto) { if (!HttpMethods.HasVerb(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } return(asyncClient.SendAsync <TResponse>(httpVerb, GetUrl(requestDto.ToUrl(httpVerb, Format)), requestDto)); }
public Task <TResponse> CustomMethodAsync <TResponse>(string httpVerb, string relativeOrAbsoluteUrl, object request) { if (!HttpMethods.HasVerb(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } var requestBody = httpVerb.HasRequestBody() ? request : null; return(SendAsync <TResponse>(httpVerb, GetBaseUrl(relativeOrAbsoluteUrl), requestBody)); }
public Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto) { if (!HttpMethods.HasVerb(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } var requestBody = httpVerb.HasRequestBody() ? requestDto : null; return(SendAsync <byte[]>(httpVerb, GetBaseUrl(requestDto.ToUrl(httpVerb, Format)), requestBody)); }
public Task <TResponse> CustomMethodAsync <TResponse>(string httpVerb, object requestDto) { if (!HttpMethods.HasVerb(httpVerb)) { throw new NotSupportedException("Unknown HTTP Method is not supported: " + httpVerb); } var requestBody = httpVerb.HasRequestBody() ? requestDto : null; return(SendAsync <TResponse>(httpVerb, ResolveTypedUrl(httpVerb, requestDto), requestBody)); }