Package org.lowcoder.plugin.api.data
Interface EndpointRequest
public interface EndpointRequest
HTTP request data definition
- Author:
- ludomikula
-
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<byte[]> body()cookies()headers()method()default StringpathVariable(String name) Get the path variable with the given name, if present.CompletableFuture<? extends Principal> queryParam(String name) Get the path variable with the given name, if present.uri()
-
Method Details
-
uri
URI uri()- Returns:
- Requested URI
-
method
PluginEndpoint.Method method()- Returns:
- HTTP request method
-
body
CompletableFuture<byte[]> body()- Returns:
- Request body
-
headers
- Returns:
- Request headers
-
header
- Parameters:
header- Request header to retrieve- Returns:
- Requested header values or null if not found
-
cookies
- Returns:
- Cookies as found in request
-
cookie
- Parameters:
cookie- Request cookie to retrieve- Returns:
- Requested cookie values or null if not found
-
attributes
- Returns:
- Request attributes
-
attribute
- Parameters:
name- Request attribute to retrieve- Returns:
- Requested attribute value
-
pathVariables
- Returns:
- Request path variables
-
pathVariable
Get the path variable with the given name, if present.- Parameters:
name- the variable name- Returns:
- the variable value
- Throws:
IllegalArgumentException- if there is no path variable with the given name
-
queryParams
- Returns:
- Request query parameters
-
queryParam
Get the path variable with the given name, if present.- Parameters:
name- the variable name- Returns:
- the variable value
- Throws:
IllegalArgumentException- if there is no path variable with the given name
-
principal
CompletableFuture<? extends Principal> principal()- Returns:
- Security principal
-