Class HttpPrologue

java.lang.Object
io.helidon.http.HttpPrologue

public class HttpPrologue extends Object
A prologue of an HTTP protocol.
  • Method Details

    • create

      public static HttpPrologue create(String rawProtocol, String protocol, String protocolVersion, Method httpMethod, String unresolvedPath, boolean validatePath)
      Create a new prologue.
      Parameters:
      rawProtocol - raw protocol string (full HTTP/1.1 or similar)
      protocol - protocol
      protocolVersion - protocol version
      httpMethod - HTTP Method
      unresolvedPath - unresolved path
      validatePath - whether to validate path (that it contains only allowed characters)
      Returns:
      a new prologue
    • create

      public static HttpPrologue create(String rawProtocol, String protocol, String protocolVersion, Method httpMethod, UriPath uriPath, UriQuery uriQuery, UriFragment uriFragment)
      Create a new prologue with decoded values.
      Parameters:
      rawProtocol - raw protocol string (full HTTP/1.1 or similar)
      protocol - protocol
      protocolVersion - protocol version
      httpMethod - HTTP Method
      uriPath - resolved path
      uriQuery - resolved query
      uriFragment - resolved fragment
      Returns:
      a new prologue
    • rawProtocol

      public String rawProtocol()
      Raw protocol, should be HTTP/1.1 or HTTP/2 in most cases.
      Returns:
      protocol
    • protocol

      public String protocol()
      Protocol name, should be HTTP in most cases.
      Returns:
      protocol
    • protocolVersion

      public String protocolVersion()
      HTTP protocol version of this request.
      Returns:
      protocol
    • method

      public Method method()
      HTTP method of this request.
      Returns:
      method
    • uriPath

      public UriPath uriPath()
      Path or the request.
      Returns:
      path
    • query

      public UriQuery query()
      Query of the request.
      Returns:
      query
    • fragment

      public UriFragment fragment()
      Fragment of the request.
      Returns:
      fragment
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object