File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-web/src/main/java/org/springframework/http Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 33
33
* {@link org.springframework.web.client.RestTemplate#exchange(RequestEntity, Class) exchange()}:
34
34
* <pre class="code">
35
35
* MyRequest body = ...
36
- * RequestEntity<MyRequest> request = RequestEntity.post(new URI("http://example.com/bar").accept(MediaType.APPLICATION_JSON).body(body);
36
+ * RequestEntity<MyRequest> request = RequestEntity.post(new URI("http://example.com/bar")) .accept(MediaType.APPLICATION_JSON).body(body);
37
37
* ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
38
38
* </pre>
39
39
*
40
40
* <p>If you would like to provide a URI template with variables, consider using
41
41
* {@link org.springframework.web.util.UriTemplate}:
42
42
* <pre class="code">
43
- * URI uri = new UriTemplate("http://example.com/{foo}"" ).expand("bar");
43
+ * URI uri = new UriTemplate("http://example.com/{foo}").expand("bar");
44
44
* RequestEntity<MyRequest> request = RequestEntity.post(uri).accept(MediaType.APPLICATION_JSON).body(body);
45
45
* </pre>
46
46
*
You can’t perform that action at this time.
0 commit comments