Clarified semantic of Request.header().
This commit is contained in:
parent
f7baf9923f
commit
fac197f868
|
@ -151,10 +151,15 @@ public interface Request
|
||||||
* @param name the name of the header
|
* @param name the name of the header
|
||||||
* @param value the value of the header
|
* @param value the value of the header
|
||||||
* @return this request object
|
* @return this request object
|
||||||
|
* @see #header(HttpHeader, String)
|
||||||
*/
|
*/
|
||||||
Request header(String name, String value);
|
Request header(String name, String value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* <p>Adds the given {@code value} to the specified {@code header}.</p>
|
||||||
|
* <p>Multiple calls with the same parameters will add multiple values;
|
||||||
|
* use the value {@code null} to remove the header completely.</p>
|
||||||
|
*
|
||||||
* @param header the header name
|
* @param header the header name
|
||||||
* @param value the value of the header
|
* @param value the value of the header
|
||||||
* @return this request object
|
* @return this request object
|
||||||
|
|
|
@ -847,6 +847,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
|
||||||
|
|
||||||
response = client.newRequest("localhost", connector.getLocalPort())
|
response = client.newRequest("localhost", connector.getLocalPort())
|
||||||
.scheme(scheme)
|
.scheme(scheme)
|
||||||
|
.header(HttpHeader.USER_AGENT, null)
|
||||||
.header(HttpHeader.USER_AGENT, userAgent)
|
.header(HttpHeader.USER_AGENT, userAgent)
|
||||||
.timeout(5, TimeUnit.SECONDS)
|
.timeout(5, TimeUnit.SECONDS)
|
||||||
.send();
|
.send();
|
||||||
|
|
Loading…
Reference in New Issue