Interface Request<T>

Type Parameters:
T - The type of the request body.
All Known Implementing Classes:
DynamicPathRequest, SimpleRequest

public sealed interface Request<T> permits SimpleRequest<T>, DynamicPathRequest<T>
Represents an HTTP Request.
  • Method Details

    • body

      T body()
      Returns:
      The request body.
    • method

      RequestMethod method()
      Returns:
      The request method.
    • headers

      Map<String,String> headers()
      Returns:
      The request headers as a map.
    • attributes

      Map<String,Object> attributes()
      Returns:
      Attributes for the request (for server-side use).
    • queryParams

      Map<String,String> queryParams()
      Returns:
      The query params as a map.
    • getUserAuthentication

      default Authentication getUserAuthentication()
      Retrieves the user's authentication from the request attributes.
      Returns:
      The user's authentication.
    • getJWTAuthToken

      default String getJWTAuthToken()
      Retrieves the user's JWT from the request attributes.
      Returns:
      The user's JWT.