public class ServletRequest extends H.Request
inputStream, reader| Constructor and Description |
|---|
ServletRequest(javax.servlet.http.HttpServletRequest req) |
| Modifier and Type | Method and Description |
|---|---|
protected Class |
_impl()
Returns the class of the implementation.
|
protected void |
_initCookieMap() |
protected String |
_ip()
Returns remote ip address
|
String |
contextPath()
Returns the context path of the request.
|
InputStream |
createInputStream() |
String |
header(String name)
Returns the header content by name.
|
Iterable<String> |
headers(String name)
Returns all header content by name.
|
H.Method |
method()
Returns the HTTP method of the request
|
ServletRequest |
method(H.Method method)
Set the Http method on this request.
|
Iterable<String> |
paramNames()
Return all parameter names
|
String |
paramVal(String name)
Return a request parameter value by name.
|
String[] |
paramVals(String name)
Returns all values associated with the name specified in the
http request.
|
String |
path()
Returns the path of the request.
|
String |
query()
Returns query string or an empty String if the request
doesn't contains a query string
|
boolean |
secure()
Check if the request was made on a secure channel
|
_setCookie, accept, accept, accept, characterEncoding, contentLength, contentType, context, context, cookie, cookies, current, current, domain, etag, etagMatches, fullPath, fullUrl, inputStream, ip, isAjax, isModified, locale, locales, me, password, port, reader, readerCreated, referer, referrer, scheme, url, user, userAgent, userAgentStrprotected Class _impl()
H.Requestpublic Iterable<String> headers(String name)
H.RequestIterable of String. If there
is no header has the name specified, then an empty iterable
is returned.
Note header name is case insensitive
public String path()
H.RequestHttpServletRequest.getServletPath()
and HttpServletRequest.getPathInfo()
The path starts with "/" but not end with "/"
public String contextPath()
H.RequestcontextPath in class H.Requestpublic String query()
H.Requestpublic boolean secure()
H.Requestprotected void _initCookieMap()
_initCookieMap in class H.Requestpublic String header(String name)
H.Requestnull is returned
Note header name is case insensitive
public H.Method method()
H.Requestpublic ServletRequest method(H.Method method)
H.Requestpublic InputStream createInputStream() throws IllegalStateException
createInputStream in class H.RequestIllegalStateExceptionpublic String paramVal(String name)
H.Requestnull is returned. If
there are multiple values associated with the name, then the
first one is returnedpublic String[] paramVals(String name)
H.Requestnew String[0] shall be returnedCopyright © 2017. All Rights Reserved.