Skip to content

Commit ec3f857

Browse files
committed
Polish contribution
See gh-27586
1 parent b3eb1a2 commit ec3f857

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,12 +23,12 @@
2323
/**
2424
* Represents an HTTP request or response entity, consisting of headers and body.
2525
*
26-
* <p>Typically used in combination with the {@link org.springframework.web.client.RestTemplate},
26+
* <p>Often used in combination with the {@link org.springframework.web.client.RestTemplate},
2727
* like so:
2828
* <pre class="code">
2929
* HttpHeaders headers = new HttpHeaders();
3030
* headers.setContentType(MediaType.TEXT_PLAIN);
31-
* HttpEntity&lt;String&gt; entity = new HttpEntity&lt;String&gt;("helloWorld", headers);
31+
* HttpEntity&lt;String&gt; entity = new HttpEntity&lt;&gt;("Hello World", headers);
3232
* URI location = template.postForLocation("https://example.com", entity);
3333
* </pre>
3434
* or
@@ -39,11 +39,11 @@
3939
* </pre>
4040
* Can also be used in Spring MVC, as a return value from a @Controller method:
4141
* <pre class="code">
42-
* &#64;RequestMapping("/handle")
42+
* &#64;GetMapping("/handle")
4343
* public HttpEntity&lt;String&gt; handle() {
4444
* HttpHeaders responseHeaders = new HttpHeaders();
4545
* responseHeaders.set("MyResponseHeader", "MyValue");
46-
* return new HttpEntity&lt;String&gt;("Hello World", responseHeaders);
46+
* return new HttpEntity&lt;&gt;("Hello World", responseHeaders);
4747
* }
4848
* </pre>
4949
*

0 commit comments

Comments
 (0)