java.lang.Object
com.pixelservices.flash.components.http.lifecycle.Request

public class Request extends Object
Represents an HTTP request, parsed from a raw buffer.
  • Constructor Details

  • Method Details

    • method

      public HttpMethod method()
      Retrieves the HTTP method of the request.
      Returns:
      the HttpMethod
    • path

      public String path()
      Retrieves the request path.
      Returns:
      the path as a string
    • header

      public String header(String name)
      Retrieves the value of a specific header.
      Parameters:
      name - the header name
      Returns:
      the header value, or null if not present
    • queryParams

      public Map<String,List<String>> queryParams()
      Retrieves the query parameters of the request.
      Returns:
      a map of query parameters
    • body

      public String body()
      Retrieves the request body.
      Returns:
      the body as a string
    • getRouteParam

      public String getRouteParam(String name)
    • getRouteParams

      public Map<String,String> getRouteParams()
    • clientAddress

      public InetSocketAddress clientAddress()
      Retrieves the client's remote address.
      Returns:
      the remote address as an InetSocketAddress
    • createRouteKey

      public static String createRouteKey(HttpMethod method, String path)
      Creates a unique route key combining method and path.
      Parameters:
      method - the HTTP method
      path - the request path
      Returns:
      a unique route key string
    • toString

      public String toString()
      Overrides:
      toString in class Object