Class Trailer

All Implemented Interfaces:
HttpHeader

public class Trailer extends HttpStringHeader
Represents an HTTP Trailer header.

The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • Trailer

      public Trailer(String value)
      Constructor with an eager value.
      Parameters:
      value - The header value. May be null.
    • Trailer

      public Trailer(Supplier<String> valueSupplier)
      Constructor with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
  • Method Details

    • of

      public static Trailer of(String value)
      Static factory method with an eager value.
      Parameters:
      value - The header value. May be null.
      Returns:
      A new instance. Never null.
    • of

      public static Trailer of(Supplier<String> valueSupplier)
      Static factory method with a lazy value supplier.
      Parameters:
      valueSupplier - Supplier for the header value. Must not be null.
      Returns:
      A new instance. Never null.