Interface HttpRequest

All Superinterfaces:
HttpMessage<HttpRequest>
All Known Implementing Classes:
NettyHttpServerRequest

public interface HttpRequest extends HttpMessage<HttpRequest>
Represents a http message which got sent from a client to the server.
Since:
4.0
  • Method Details

    • pathParameters

      @NonNull @NonNull Map<String,String> pathParameters()
      The path parameters of the request, parsed before processing the next handler in the chain. A handler can provide a path parameter by wrapping its name into {name} would result as a key in this map at the given path index. For example the path /docs/{topic}/index/{page} would contain the path parameters topic and page, parsed from the request uri before calling the request handler. Each handler can access the path parameters of handlers beforehand, however duplicate path parameter names will override each other.
      Returns:
      all parsed path parameters for the current request.
    • path

      Get the full, originally requested path.
      Returns:
      the full, originally requested path.
    • uri

      Get the full requested uri.
      Returns:
      the full requested uri.
    • method

      Get the method used for this request. The method might be one of
      • OPTIONS
      • GET
      • HEAD
      • POST
      • PUT
      • PATCH
      • DELETE
      • TRACE
      • CONNECT

      See the mdn documentation for more information about http request methods.

      Returns:
      the request method of the request.
    • queryParameters

      @NonNull @NonNull Map<String,List<String>> queryParameters()
      Get all query parameters mapped by the key of it to the value. Each query parameter can have multiple values set. The maximum amount of query parameters which will get decoded for a request are 1024.
      Returns:
      the query parameters supplied in the request uri.