List of usage examples for org.springframework.http HttpMethod resolve
@Nullable public static HttpMethod resolve(@Nullable String method)
From source file:com.github.ljtfreitas.restify.http.spring.client.request.RequestEntityConverter.java
@Override public RequestEntity<Object> convert(EndpointRequest source) { Object body = source.body().orElse(null); HttpHeaders headers = headersOf(source.headers()); HttpMethod method = HttpMethod.resolve(source.method()); return new RequestEntity<>(body, headers, method, source.endpoint()); }
From source file:io.github.microcks.util.openapi.OpenAPITestRunner.java
/** * Build the HttpMethod corresponding to string. */ @Override public HttpMethod buildMethod(String method) { return HttpMethod.resolve(method.toUpperCase()); }
From source file:io.restassured.module.mockmvc.internal.MockMvcRequestSenderImpl.java
private HttpMethod toValidHttpMethod(String method) { String httpMethodAsString = notNull(trimToNull(method), "HTTP Method"); HttpMethod httpMethod = HttpMethod.resolve(httpMethodAsString.toUpperCase()); if (httpMethod == null) { throw new IllegalArgumentException("HTTP method '" + method + "' is not supported by MockMvc"); }/*w ww. j a v a 2s. co m*/ return httpMethod; }