Improve example in Javadoc for HttpEntity

Closes gh-27586
This commit is contained in:
no-brand
2021-10-21 07:19:26 +00:00
committed by Sam Brannen
parent bce850aa12
commit b3eb1a2ad7

View File

@@ -28,7 +28,7 @@ import org.springframework.util.ObjectUtils;
* <pre class="code">
* HttpHeaders headers = new HttpHeaders();
* headers.setContentType(MediaType.TEXT_PLAIN);
* HttpEntity&lt;String&gt; entity = new HttpEntity&lt;String&gt;(helloWorld, headers);
* HttpEntity&lt;String&gt; entity = new HttpEntity&lt;String&gt;("helloWorld", headers);
* URI location = template.postForLocation("https://example.com", entity);
* </pre>
* or