Example usage for Java org.springframework.boot.test.web.client TestRestTemplate fields, constructors, methods, implement or subclass
The text is from its open source code.
TestRestTemplate | |
TestRestTemplate(RestTemplateBuilder restTemplateBuilder) Create a new TestRestTemplate instance. | |
TestRestTemplate(HttpClientOption... httpClientOptions) Create a new TestRestTemplate instance. | |
TestRestTemplate(RestTemplateBuilder builder, String username, String password, HttpClientOption... httpClientOptions) Create a new TestRestTemplate instance with the specified credentials. |
ResponseEntity | exchange(URI url, HttpMethod method, HttpEntity> requestEntity, Class Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity . |
ResponseEntity | exchange(URI url, HttpMethod method, HttpEntity> requestEntity, ParameterizedTypeReference Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as ResponseEntity . |
ResponseEntity | getForEntity(URI url, Class Retrieve a representation by doing a GET on the URL . |
RestTemplate | getRestTemplate() Returns the underlying RestTemplate that is actually used to perform the REST operations. |
ResponseEntity | postForEntity(URI url, Object request, Class Create a new resource by POSTing the given object to the URL, and returns the response as ResponseEntity . |
void | setUriTemplateHandler(UriTemplateHandler handler) Configure the UriTemplateHandler to use to expand URI templates. |
TestRestTemplate | withBasicAuth(String username, String password) Creates a new TestRestTemplate with the same configuration as this one, except that it will send basic authorization headers using the given username and password . |