Class Request
java.lang.Object
com.pixelservices.flash.components.http.lifecycle.Request
Represents an HTTP request, parsed from a raw buffer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()
Retrieves the request body.Retrieves the client's remote address.static String
createRouteKey
(HttpMethod method, String path) Creates a unique route key combining method and path.getRouteParam
(String name) Retrieves the value of a specific header.method()
Retrieves the HTTP method of the request.path()
Retrieves the request path.Retrieves the query parameters of the request.toString()
-
Constructor Details
-
Request
-
-
Method Details
-
method
Retrieves the HTTP method of the request.- Returns:
- the HttpMethod
-
path
Retrieves the request path.- Returns:
- the path as a string
-
header
Retrieves the value of a specific header.- Parameters:
name
- the header name- Returns:
- the header value, or null if not present
-
queryParams
Retrieves the query parameters of the request.- Returns:
- a map of query parameters
-
body
Retrieves the request body.- Returns:
- the body as a string
-
getRouteParam
-
getRouteParams
-
clientAddress
Retrieves the client's remote address.- Returns:
- the remote address as an InetSocketAddress
-
createRouteKey
Creates a unique route key combining method and path.- Parameters:
method
- the HTTP methodpath
- the request path- Returns:
- a unique route key string
-
toString
-