Interface HttpHeader


public interface HttpHeader
An HTTP header.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a string that represents the HTTP header name.
    static HttpHeader
    of(String name, String value)
    Returns an instance of the HttpHeader with the given name and value.
    default String
    Returns a string that represents the HTTP header value.
  • Method Details

    • of

      static HttpHeader of(String name, String value)
      Returns an instance of the HttpHeader with the given name and value.
      Parameters:
      name - the name of the HTTP header
      value - the value of the HTTP header
      Throws:
      IllegalArgumentException - when name is empty or blank
    • name

      default String name()
      Returns a string that represents the HTTP header name.
    • value

      default String value()
      Returns a string that represents the HTTP header value.