public final class Request
extends java.lang.Object
Resolver
.Constructor and Description |
---|
Request(java.lang.String method,
java.lang.String target,
WebUser user,
java.util.Map<java.lang.String,java.lang.String> headers) |
Request(java.lang.String method,
URIPath path,
URIQuery query,
WebUser user,
java.util.Map<java.lang.String,java.lang.String> headers)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getHeader(java.lang.String key)
Get a header in the request.
|
java.lang.String |
getMethod()
Get HTTP method.
|
URIPath |
getPath()
Get the Requested path.
|
URIQuery |
getQuery()
Get the Request parameters.
|
java.util.Optional<WebUser> |
getUser()
Get the user making the request.
|
Request |
omitFirstInPath() |
java.lang.String |
toString() |
public Request(java.lang.String method, URIPath path, URIQuery query, WebUser user, java.util.Map<java.lang.String,java.lang.String> headers)
method
- HTTP method, GET, PUT, POST, etcpath
- Requested path /example/targetquery
- Request parameters ?param=value etcuser
- Web user doing the request (if authenticated)headers
- Request headers https://developer.mozilla.org/en-US/docs/Web/HTTP/Headerspublic Request(java.lang.String method, java.lang.String target, WebUser user, java.util.Map<java.lang.String,java.lang.String> headers)
public java.lang.String getMethod()
public java.util.Optional<WebUser> getUser()
public java.util.Optional<java.lang.String> getHeader(java.lang.String key)
key
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headerspublic Request omitFirstInPath()
public java.lang.String toString()
toString
in class java.lang.Object