public abstract class WebRequest extends Request
Modifier and Type | Field and Description |
---|---|
static String |
HEADER_AJAX
marker for Ajax requests
|
static String |
HEADER_AJAX_BASE_URL
marker for Ajax-relative url
|
static String |
HEADER_ORIGIN
Origin http header |
static String |
HEADER_REFERER
Referer http header |
static String |
PARAM_AJAX
marker for Ajax requests
|
static String |
PARAM_AJAX_BASE_URL
marker for Ajax-relative url
|
static String |
PARAM_AJAX_REQUEST_ANTI_CACHE
anti-cache query parameter added by Wicket.Ajax.Request at its URL
|
Constructor and Description |
---|
WebRequest() |
Modifier and Type | Method and Description |
---|---|
WebRequest |
cloneWithUrl(Url url)
Returns request with specified URL and same POST parameters as this request.
|
javax.servlet.http.Cookie |
getCookie(String cookieName) |
abstract List<javax.servlet.http.Cookie> |
getCookies() |
abstract Time |
getDateHeader(String name)
Returns the value of the specified request header as a
long value that
represents a Date object. |
abstract String |
getHeader(String name)
Returns the value of the specified request header as a
String |
abstract List<String> |
getHeaders(String name)
Returns all the values of the specified request header.
|
Time |
getIfModifiedSinceHeader()
Convenience method for retrieving If-Modified-Since header.
|
boolean |
isAjax()
Returns whether this request is an Ajax request.
|
boolean |
shouldPreserveClientUrl()
Signals whether or not request processing should preserve the current client url - in other
words, handle this request without redirecting.
|
getCharset, getClientUrl, getContainerRequest, getContextPath, getFilterPath, getLocale, getOriginalUrl, getPostParameters, getPrefixToContextPath, getQueryParameters, getRequestParameters, getUrl
public static final String PARAM_AJAX
public static final String HEADER_AJAX
public static final String PARAM_AJAX_BASE_URL
public static final String HEADER_AJAX_BASE_URL
public static final String PARAM_AJAX_REQUEST_ANTI_CACHE
public static final String HEADER_ORIGIN
Origin
http headerpublic static final String HEADER_REFERER
Referer
http headerpublic abstract List<javax.servlet.http.Cookie> getCookies()
public javax.servlet.http.Cookie getCookie(String cookieName)
cookieName
- null
if the cookie does not existpublic abstract List<String> getHeaders(String name)
name
- public abstract String getHeader(String name)
String
name
- public abstract Time getDateHeader(String name)
long
value that
represents a Date
object. Use this method with headers that contain dates, such
as If-Modified-Since
.name
- null
if not foundpublic final Time getIfModifiedSinceHeader()
null
if not setpublic boolean isAjax()
true
if this request is an ajax request, false
otherwise.public boolean shouldPreserveClientUrl()
false
.
For example, this method can be used to preserve the url that caused a 404 in the browser if
Wicket is also responsible for rendering the 404 page. If this method returns the default
value of false
then Wicket will redirect to the bookmarkable url of the error page,
instead of preserving the url that caused the 404 in the browser.true
if current client url should be preservedpublic WebRequest cloneWithUrl(Url url)
cloneWithUrl
in class Request
url
- Url instanceCopyright © 2006–2022 Apache Software Foundation. All rights reserved.