@Test public void POSTでレスポンスが取得できる() throws URISyntaxException { String s = template.post(Target.target(baseUrl + "/{method}", "post"), Entity.text(helloWorld), String.class); assertThat(s, CoreMatchers.is(helloWorld)); }
@Override public <T> T post(Target target, Entity<?> entity, Class<T> responseType) throws RestClientException { return postForEntity(target, entity, responseType).getBody(); }
RestClientTemplate implements RestClientOperations { @Override public <T> T post(Target target, Entity<?> entity, Class<T> responseType) throws RestClientException { return postForEntity(target, entity, responseType).getBody(); } }
RestClientTemplate implements RestClientOperations { @Override public <T> T post(Target target, Entity<?> entity, Class<T> responseType) throws RestClientException { return postForEntity(target, entity, responseType).getBody(); } RestClientTemplate();  RestClientTemplate(RestOperations delegate); }
RestClientTemplate implements RestClientOperations { @Override public <T> T post(Target target, Entity<?> entity, Class<T> responseType) throws RestClientException { return postForEntity(target, entity, responseType).getBody(); } RestClientTemplate();  RestClientTemplate(RestOperations delegate); void setDelegate(RestOperations delegate); @Override T get(Target target, Class<T> responseType); @Override ResponseEntity<T> getForEntity(Target target, Class<T> responseType); @Override T delete(Target target, Class<T> responseType); @Override T delete(Target target, Entity<?> entity, Class<T> responseType); @Override ResponseEntity<T> deleteForEntity(Target target, Class<T> responseType); @Override ResponseEntity<T> deleteForEntity(Target target, Entity<?> entity, Class<T> responseType); @Override T post(Target target, Entity<?> entity, Class<T> responseType); @Override ResponseEntity<T> postForEntity(Target target, Entity<?> entity, Class<T> responseType); T put(Target target, Entity<?> entity, Class<T> responseType); ResponseEntity<T> putForEntity(Target target, Entity<?> entity, Class<T> responseType); @Override T getForObject(String url, Class<T> responseType, Object... uriVariables); @Override T getForObject(String url, Class<T> responseType, Map<String, ?> uriVariables); @Override T getForObject(URI url, Class<T> responseType); @Override ResponseEntity<T> getForEntity(String url, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> getForEntity(String url, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> getForEntity(URI url, Class<T> responseType); @Override HttpHeaders headForHeaders(String url, Object... uriVariables); @Override HttpHeaders headForHeaders(String url, Map<String, ?> uriVariables); @Override HttpHeaders headForHeaders(URI url); @Override URI postForLocation(String url, Object request, Object... uriVariables); @Override URI postForLocation(String url, Object request, Map<String, ?> uriVariables); @Override URI postForLocation(URI url, Object request); @Override T postForObject(String url, Object request, Class<T> responseType, Object... uriVariables); @Override T postForObject(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables); @Override T postForObject(URI url, Object request, Class<T> responseType); @Override ResponseEntity<T> postForEntity(String url, Object request, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> postForEntity(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> postForEntity(URI url, Object request, Class<T> responseType); @Override void put(String url, Object request, Object... uriVariables); @Override void put(String url, Object request, Map<String, ?> uriVariables); @Override void put(URI url, Object request); @Override void delete(String url, Object... uriVariables); @Override void delete(String url, Map<String, ?> uriVariables); @Override void delete(URI url); @Override Set<HttpMethod> optionsForAllow(String url, Object... uriVariables); @Override Set<HttpMethod> optionsForAllow(String url, Map<String, ?> uriVariables); @Override Set<HttpMethod> optionsForAllow(URI url); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType); @Override T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables); @Override T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String, ?> uriVariables); @Override T execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor); }
RestClientTemplate implements RestClientOperations { @Override public <T> T post(Target target, Entity<?> entity, Class<T> responseType) throws RestClientException { return postForEntity(target, entity, responseType).getBody(); } RestClientTemplate();  RestClientTemplate(RestOperations delegate); void setDelegate(RestOperations delegate); @Override T get(Target target, Class<T> responseType); @Override ResponseEntity<T> getForEntity(Target target, Class<T> responseType); @Override T delete(Target target, Class<T> responseType); @Override T delete(Target target, Entity<?> entity, Class<T> responseType); @Override ResponseEntity<T> deleteForEntity(Target target, Class<T> responseType); @Override ResponseEntity<T> deleteForEntity(Target target, Entity<?> entity, Class<T> responseType); @Override T post(Target target, Entity<?> entity, Class<T> responseType); @Override ResponseEntity<T> postForEntity(Target target, Entity<?> entity, Class<T> responseType); T put(Target target, Entity<?> entity, Class<T> responseType); ResponseEntity<T> putForEntity(Target target, Entity<?> entity, Class<T> responseType); @Override T getForObject(String url, Class<T> responseType, Object... uriVariables); @Override T getForObject(String url, Class<T> responseType, Map<String, ?> uriVariables); @Override T getForObject(URI url, Class<T> responseType); @Override ResponseEntity<T> getForEntity(String url, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> getForEntity(String url, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> getForEntity(URI url, Class<T> responseType); @Override HttpHeaders headForHeaders(String url, Object... uriVariables); @Override HttpHeaders headForHeaders(String url, Map<String, ?> uriVariables); @Override HttpHeaders headForHeaders(URI url); @Override URI postForLocation(String url, Object request, Object... uriVariables); @Override URI postForLocation(String url, Object request, Map<String, ?> uriVariables); @Override URI postForLocation(URI url, Object request); @Override T postForObject(String url, Object request, Class<T> responseType, Object... uriVariables); @Override T postForObject(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables); @Override T postForObject(URI url, Object request, Class<T> responseType); @Override ResponseEntity<T> postForEntity(String url, Object request, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> postForEntity(String url, Object request, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> postForEntity(URI url, Object request, Class<T> responseType); @Override void put(String url, Object request, Object... uriVariables); @Override void put(String url, Object request, Map<String, ?> uriVariables); @Override void put(URI url, Object request); @Override void delete(String url, Object... uriVariables); @Override void delete(String url, Map<String, ?> uriVariables); @Override void delete(URI url); @Override Set<HttpMethod> optionsForAllow(String url, Object... uriVariables); @Override Set<HttpMethod> optionsForAllow(String url, Map<String, ?> uriVariables); @Override Set<HttpMethod> optionsForAllow(URI url); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, Class<T> responseType); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables); @Override ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String, ?> uriVariables); @Override ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType); @Override T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Object... uriVariables); @Override T execute(String url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, Map<String, ?> uriVariables); @Override T execute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor);  }