- java.lang.Object
-
- io.helidon.common.http.Forwarded
-
public class Forwarded extends Object
A representation of theHttp.Header.FORWARDEDHTTP header.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>by()bydirective of the forwarded header.static List<Forwarded>create(Headers headers)Parse forwarded header(s) from the provided headers.static Forwardedcreate(String string)Create forwarded from a value of a single forwarded header, such asby=a.b.c;for=d.e.f;host=host;proto=https.Optional<String>forClient()fordirective of the forwarded header.Optional<String>host()hostdirective of the forwarded header.Optional<String>proto()protodirective of the forwarded header.
-
-
-
Method Detail
-
create
public static Forwarded create(String string)
Create forwarded from a value of a single forwarded header, such asby=a.b.c;for=d.e.f;host=host;proto=https.- Parameters:
string- string representation of a single forwarded header- Returns:
- forwarded parsed from the string
- See Also:
create(Headers)
-
create
public static List<Forwarded> create(Headers headers)
Parse forwarded header(s) from the provided headers.- Parameters:
headers- header to process- Returns:
- list of forwarded headers, will be empty if the header does not exist.
-
forClient
public Optional<String> forClient()
fordirective of the forwarded header.- Returns:
- for directive
-
host
public Optional<String> host()
hostdirective of the forwarded header. The host of the original request.- Returns:
- host directive
-
-