public interface NativeRequest
NativeRequest
.Modifier and Type | Method and Description |
---|---|
default Map<String,Object> |
attributes() |
List<Cookie> |
cookies() |
List<NativeUpload> |
files(String name)
Get all the files for the provided name or an empty list.
|
Optional<String> |
header(String name)
Get the first header for the provided name or a empty list.
|
List<String> |
headerNames() |
List<String> |
headers(String name)
Get all the headers for the provided name or a empty list.
|
InputStream |
in()
Input stream that represent the body.
|
String |
ip() |
String |
method() |
List<String> |
paramNames() |
List<String> |
params(String name)
Get all the params for the provided name or a empty list.
|
String |
path() |
String |
protocol() |
default void |
push(String method,
String path,
Map<String,Object> headers)
Send push promise to the client.
|
Optional<String> |
queryString()
Returns the query string that is contained in the request URL after the path.
|
String |
rawPath() |
boolean |
secure() |
void |
startAsync(Executor executor,
Runnable runnable)
Put the request in async mode.
|
<T> T |
upgrade(Class<T> type)
Upgrade the request to something else...like a web socket.
|
String method()
String path()
Optional<String> queryString()
empty
List<String> paramNames() throws Exception
Exception
- If param extraction fails.List<String> params(String name) throws Exception
name
- Parameter name.Exception
- If param parsing fails.List<String> headers(String name)
name
- Header name.Optional<String> header(String name)
name
- Header name.List<NativeUpload> files(String name) throws IOException
name
- File name.IOException
- If file parsing fails.InputStream in() throws IOException
IOException
- If body read fails.String ip()
String protocol()
boolean secure()
<T> T upgrade(Class<T> type) throws Exception
T
- Upgrade type.type
- Upgrade type.Exception
- If the upgrade fails or it is un-supported.NativeWebSocket
void startAsync(Executor executor, Runnable runnable)
executor
- Executor to use.runnable
- Task to run.default void push(String method, String path, Map<String,Object> headers) throws Exception
method
- HTTP method.path
- HTTP path.headers
- HTTP headers.Exception
- If something goes wrong.String rawPath()
Copyright © 2017. All rights reserved.