Class Forwarded

java.lang.Object
io.helidon.common.http.Forwarded

public class Forwarded extends Object
A representation of the Http.Header.FORWARDED HTTP header.
  • Method Details

    • create

      public static Forwarded create(String string)
      Create forwarded from a value of a single forwarded header, such as by=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

      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.
    • by

      public Optional<String> by()
      by directive of the forwarded header.
      Returns:
      by directive
    • 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
    • proto

      public Optional<String> proto()
      proto directive of the forwarded header. The protocol of the original request (http or https).
      Returns:
      proto directive