Interface Request
public interface Request
This interface represents the request of the current user interaction.
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Get the body.Get the cookies.Get the first value of the header with the specified name.getHeaders
(String name) Get the value list of the header with the specified name.Get the method of the request.getParameter
(String name) Get the first value of the parameter with the specified name.getParameters
(String name) Get the value list of the parameter with the specified name.getUri()
Get the URI of the request.
-
Method Details
-
getMethod
String getMethod()Get the method of the request. Examples of methods are GET, POST, PUT, and DELETE.- Returns:
- The method.
-
getUri
String getUri()Get the URI of the request.- Returns:
- The URI.
-
getHeader
Get the first value of the header with the specified name. If such header does not exist, this method returns NULL.- Parameters:
name
- The name.- Returns:
- The first value.
-
getHeaders
Get the value list of the header with the specified name. If such header does not exist, this method returns an empty value list.- Parameters:
name
- The name.- Returns:
- The value list.
-
getCookies
Get the cookies. If no cookies exist, this method returns an empty list.- Returns:
- The cookies.
-
getBody
InputStream getBody()Get the body.- Returns:
- The body.
-
getParameter
Get the first value of the parameter with the specified name. If such parameter does not exist, this method returns NULL.- Parameters:
name
- The name.- Returns:
- The first value.
-
getParameters
Get the value list of the parameter with the specified name. If such parameter does not exist, this method returns an empty value list.- Parameters:
name
- The name.- Returns:
- The value list.
-