Interface HeaderName


public sealed interface HeaderName
HTTP header name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Header name as used in HTTP/1, or "human-readable" value of this header.
    default int
    Index of this header (if one of the known indexed headers), or -1 if this is a custom header name.
    default boolean
    Http2 defines pseudoheaders as headers starting with a : character.
    Lowercase value of this header, used by HTTP/2, may be used for lookup by HTTP/1.
  • Method Details

    • lowerCase

      String lowerCase()
      Lowercase value of this header, used by HTTP/2, may be used for lookup by HTTP/1. There is no validation of this value, so if this contains an upper-case letter, behavior is undefined.
      Returns:
      name of the header, lowercase
    • defaultCase

      String defaultCase()
      Header name as used in HTTP/1, or "human-readable" value of this header.
      Returns:
      name of the header, may use uppercase and/or lowercase
    • index

      default int index()
      Index of this header (if one of the known indexed headers), or -1 if this is a custom header name.
      Returns:
      index of this header
    • isPseudoHeader

      default boolean isPseudoHeader()
      Http2 defines pseudoheaders as headers starting with a : character. These are used instead of the prologue line from HTTP/1 (to define path, authority etc.) and instead of status line in response.
      Returns:
      whether this header is a pseudo-header