public class MockHttpRequest extends Object implements HttpRequest
| Constructor and Description |
|---|
MockHttpRequest() |
| Modifier and Type | Method and Description |
|---|---|
String |
getHeader(String name)
Get the named HTTP request header.
|
String |
getParameter(String name)
Get the named HTTP request parameter from the request query string.
|
Enumeration |
getParameterNames()
Returns an Enumeration of String objects containing the names of the
parameters contained in this request.
|
String[] |
getParameterValues(String name)
Returns an array of String objects containing all of the values the given
request parameter has, or null if the parameter does not exist.
|
void |
reset() |
void |
setHeader(String header,
String value) |
void |
setParameter(String parameter,
String value) |
public String getHeader(String name)
HttpRequestgetHeader in interface HttpRequestname - The request header name.public String getParameter(String name)
HttpRequestgetParameter in interface HttpRequestname - The name of the required request parameter.public Enumeration getParameterNames()
HttpRequestgetParameterNames in interface HttpRequestpublic String[] getParameterValues(String name)
HttpRequestgetParameterValues in interface HttpRequestname - String containing the name of the parameter whose value is
requested.public void reset()
Copyright © 2020. All rights reserved.