Improve example in Javadoc for HttpEntity
Closes gh-27586
This commit is contained in:
@@ -28,7 +28,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* <pre class="code">
|
||||
* HttpHeaders headers = new HttpHeaders();
|
||||
* headers.setContentType(MediaType.TEXT_PLAIN);
|
||||
* HttpEntity<String> entity = new HttpEntity<String>(helloWorld, headers);
|
||||
* HttpEntity<String> entity = new HttpEntity<String>("helloWorld", headers);
|
||||
* URI location = template.postForLocation("https://example.com", entity);
|
||||
* </pre>
|
||||
* or
|
||||
|
||||
Reference in New Issue
Block a user