Skip to content

Commit 71a7b5d

Browse files
committed
Fixed code examples
Issue: SPR-13666
1 parent 2bf8c0b commit 71a7b5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-web/src/main/java/org/springframework/http/RequestEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
* {@link org.springframework.web.client.RestTemplate#exchange(RequestEntity, Class) exchange()}:
3434
* <pre class="code">
3535
* MyRequest body = ...
36-
* RequestEntity&lt;MyRequest&gt; request = RequestEntity.post(new URI(&quot;http://example.com/bar&quot;).accept(MediaType.APPLICATION_JSON).body(body);
36+
* RequestEntity&lt;MyRequest&gt; request = RequestEntity.post(new URI(&quot;http://example.com/bar&quot;)).accept(MediaType.APPLICATION_JSON).body(body);
3737
* ResponseEntity&lt;MyResponse&gt; response = template.exchange(request, MyResponse.class);
3838
* </pre>
3939
*
4040
* <p>If you would like to provide a URI template with variables, consider using
4141
* {@link org.springframework.web.util.UriTemplate}:
4242
* <pre class="code">
43-
* URI uri = new UriTemplate(&quot;http://example.com/{foo}&quot;").expand(&quot;bar&quot;);
43+
* URI uri = new UriTemplate(&quot;http://example.com/{foo}&quot;).expand(&quot;bar&quot;);
4444
* RequestEntity&lt;MyRequest&gt; request = RequestEntity.post(uri).accept(MediaType.APPLICATION_JSON).body(body);
4545
* </pre>
4646
*

0 commit comments

Comments
 (0)