Issue #4787 - Make org.eclipse.jetty.client.HttpRequest's host name writable.

Made the methods in the interface default so that potential implementers do not break.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-05-14 14:57:49 +02:00
parent ad51bc1af6
commit 5cff403a69
1 changed files with 8 additions and 3 deletions

View File

@ -70,7 +70,10 @@ public interface Request
* @param host the URI host of this request, such as "127.0.0.1" or "google.com"
* @return this request object
*/
Request host(String host);
default Request host(String host)
{
return this;
}
/**
* @return the URI port of this request such as 80 or 443
@ -78,11 +81,13 @@ public interface Request
int getPort();
/**
*
* @param port the URI port of this request such as 80 or 443
* @return this request object
*/
Request port(int port);
default Request port(int port)
{
return this;
}
/**
* @return the method of this request, such as GET or POST, as a String