public class SimpleGetRequest extends Request
Request used
for testing. Call the method setParam(String, String) to
emulate some parameter values.| Constructor and Description |
|---|
SimpleGetRequest() |
| Modifier and Type | Method and Description |
|---|---|
String |
getMediaType()
Returns the requested MIME type, or
"application/octet-stream" if not specified. |
Map<String,String> |
getParams() |
boolean |
hasParam(String key)
Return true of the parameter is set.
|
LocalConnector |
localConnector()
Allows a web service to call another web service.
|
String |
method()
Returns the name of the HTTP method with which this request was made.
|
String |
param(String key) |
InputStream |
paramAsInputStream(String key) |
SimpleGetRequest |
setMediaType(String mediaType) |
SimpleGetRequest |
setParam(String key,
String value) |
mandatoryParam, mandatoryParamAsBoolean, mandatoryParamAsEnum, mandatoryParamAsInt, mandatoryParamAsLong, mandatoryParamAsStrings, param, paramAsBoolean, paramAsBoolean, paramAsDate, paramAsDateTime, paramAsEnum, paramAsEnums, paramAsInt, paramAsInt, paramAsLong, paramAsLong, paramAsStringspublic SimpleGetRequest()
public String method()
Requestpublic String getMediaType()
Request"application/octet-stream" if not specified.getMediaType in class Requestpublic SimpleGetRequest setMediaType(String mediaType)
public boolean hasParam(String key)
Requestpublic InputStream paramAsInputStream(String key)
paramAsInputStream in class Requestpublic SimpleGetRequest setParam(String key, @Nullable String value)
public LocalConnector localConnector()
RequestlocalConnector in class RequestLocalConnectorCopyright © 2009–2017 SonarSource. All rights reserved.