public interface RebelHttpServletRequest
Separate interface is required as the javax.servlet.http.HttpServletRequest
interface is not loaded by the boot class loader.
In practice a bytecode processor makes javax.servlet.http.HttpServletRequest
to extend the given interface.
ServletIntegration| Modifier and Type | Method and Description |
|---|---|
String |
getMethod()
Returns the name of the HTTP method with which this
request was made, for example, GET, POST, or PUT.
|
String |
getQueryString()
Returns the query string that is contained in the request
URL after the path.
|
String |
getRequestURI()
Returns the part of this request's URL from the protocol
name up to the query string in the first line of the HTTP request.
|
StringBuffer |
getRequestURL()
Reconstructs the URL the client used to make the request.
|
StringBuffer getRequestURL()
Because this method returns a StringBuffer,
not a string, you can modify the URL easily, for example,
to append query parameters.
This method is useful for creating redirect messages and for reporting errors.
StringBuffer object containing
the reconstructed URLString getRequestURI()
| First line of HTTP request | Returned Value | |
|---|---|---|
| POST /some/path.html HTTP/1.1 | /some/path.html | |
| GET http://foo.bar/a.html HTTP/1.0 | /a.html | |
| HEAD /xyz?a=b HTTP/1.1 | /xyz |
String containing
the part of the URL from the
protocol name up to the query stringString getMethod()
String
specifying the name
of the method with which
this request was madeString getQueryString()
null
if the URL does not have a query string. Same as the value
of the CGI variable QUERY_STRING.String containing the query
string or null if the URL
contains no query string. The value is not
decoded by the container.Copyright © 2018. All rights reserved.