@Override public HttpMethod getMethod() { return HttpMethod.from(method); }
/** * Get HttpMethod enum constant matching given <code>methodName</code> name * @param methodName Method name * @return Matching HttpMethod, or <code>null</code> if none match */ public static HttpMethod from(String methodName) { if (methodName != null) { for (HttpMethod value : values()) { if (methodName.equalsIgnoreCase(value.getMethodName())) { return value; } } } return null; }
@Override public <T, R> Mono<ReactiveResponseEntity<T>> invoke(ReactiveRequestDefinition requestDefinition, HttpMethod method, RequestEntity<R> requestEntity, ResponseType<T> responseType, boolean onlySuccessfulStatusCode) { // invocation builder final Builder builder = JaxrsRestClientOperations.configure(getClient(), requestDefinition).request(); // headers requestDefinition.getHeaders().forEach((n, v) -> builder.header(n, v)); // invoker final AsyncInvoker invoker = builder.async(); return Mono.<ReactiveResponseEntity<T>>create(sink -> { Optional<Entity<?>> entity = JaxrsRestClientOperations.buildRequestEntity(requestEntity); if (entity.isPresent()) { invoker.method(method.getMethodName(), entity.get(), new ResponseInvocationCallback<>(sink, responseType, onlySuccessfulStatusCode)); } else { invoker.method(method.getMethodName(), new ResponseInvocationCallback<>(sink, responseType, onlySuccessfulStatusCode)); } }); }
.resolve(method.getMethodName()); if (requestMethod == null) { throw new RestClientException("Unsupported HTTP method: " + method.getMethodName());
@Override public HttpMethod getMethod() { return HttpMethod.from(request.getMethod()); }
@Override public HttpMethod getMethod() { return HttpMethod.from(request.getMethod()); }
@Override public HttpMethod getMethod() { return HttpMethod.from(request.getMethod()); }
@Override public HttpMethod getMethod() { return HttpMethod.from(request.getMethod()); }
@Override public HttpMethod getMethod() { return HttpMethod.from(request.getMethod()); }