- java.lang.Object
-
- io.helidon.common.http.Forwarded
-
public class Forwarded extends Object
A representation of theHttp.Header.FORWARDED
HTTP header.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
by()
by
directive of the forwarded header.static List<Forwarded>
create(Headers headers)
Parse forwarded header(s) from the provided headers.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
.Optional<String>
forClient()
for
directive of the forwarded header.Optional<String>
host()
host
directive of the forwarded header.Optional<String>
proto()
proto
directive 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()
for
directive of the forwarded header.- Returns:
- for directive
-
host
public Optional<String> host()
host
directive of the forwarded header. The host of the original request.- Returns:
- host directive
-
-