本文整理了Java中feign.Request.httpMethod
方法的一些代码示例,展示了Request.httpMethod
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.httpMethod
方法的具体详情如下:
包路径:feign.Request
类名称:Request
方法名:httpMethod
暂无
代码示例来源:origin: spring-cloud/spring-cloud-openfeign
private Request toRequest(Request request) {
Map<String, Collection<String>> headers = new LinkedHashMap<>(
request.headers());
return Request.create(request.httpMethod(), getUri().toASCIIString(), headers,
request.requestBody());
}
代码示例来源:origin: org.springframework.cloud/spring-cloud-openfeign-core
private Request toRequest(Request request) {
Map<String, Collection<String>> headers = new LinkedHashMap<>(
request.headers());
return Request.create(request.httpMethod(), getUri().toASCIIString(), headers,
request.requestBody());
}
代码示例来源:origin: io.github.openfeign/feign-okhttp
HttpMethod.POST == input.httpMethod() || HttpMethod.PUT == input.httpMethod()
|| HttpMethod.PATCH == input.httpMethod();
if (isMethodWithBody) {
requestBuilder.removeHeader("Content-Type");
requestBuilder.method(input.httpMethod().name(), body);
return requestBuilder.build();
代码示例来源:origin: org.springframework.cloud/spring-cloud-openfeign-core
@Override
public HttpMethod getMethod() {
return HttpMethod
.resolve(RibbonRequest.this.toRequest().httpMethod().name());
}
代码示例来源:origin: spring-cloud/spring-cloud-openfeign
@Override
public HttpMethod getMethod() {
return HttpMethod
.resolve(RibbonRequest.this.toRequest().httpMethod().name());
}
代码示例来源:origin: io.github.openfeign/feign-httpclient
HttpUriRequest toHttpUriRequest(Request request, Request.Options options)
throws URISyntaxException {
RequestBuilder requestBuilder = RequestBuilder.create(request.httpMethod().name());
代码示例来源:origin: org.springframework.cloud/spring-cloud-openfeign-core
@Override
public RequestSpecificRetryHandler getRequestSpecificRetryHandler(
RibbonRequest request, IClientConfig requestConfig) {
if (this.ribbon.isOkToRetryOnAllOperations()) {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
if (!request.toRequest().httpMethod().name().equals("GET")) {
return new RequestSpecificRetryHandler(true, false, this.getRetryHandler(),
requestConfig);
}
else {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
}
代码示例来源:origin: spring-cloud/spring-cloud-openfeign
@Override
public RequestSpecificRetryHandler getRequestSpecificRetryHandler(
RibbonRequest request, IClientConfig requestConfig) {
if (this.ribbon.isOkToRetryOnAllOperations()) {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
if (!request.toRequest().httpMethod().name().equals("GET")) {
return new RequestSpecificRetryHandler(true, false, this.getRetryHandler(),
requestConfig);
}
else {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
}
代码示例来源:origin: twitch4j/twitch4j
throw new UnauthorizedException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
throw new NotFoundException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
return new ContextedRuntimeException("Helix API Error")
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody)
代码示例来源:origin: twitch4j/twitch4j
throw new UnauthorizedException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
throw new NotFoundException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
return new ContextedRuntimeException("Helix API Error")
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody)
代码示例来源:origin: twitch4j/twitch4j
throw new UnauthorizedException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
throw new NotFoundException()
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody);
return new ContextedRuntimeException("Helix API Error")
.addContextValue("requestUrl", response.request().url())
.addContextValue("requestMethod", response.request().httpMethod())
.addContextValue("requestHeaders", response.request().headers().entrySet().toString())
.addContextValue("responseBody", responseBody)
内容来源于网络,如有侵权,请联系作者删除!