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. |
boolean |
hasParam(String key)
Return true of the parameter is set.
|
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, paramAsStrings
public SimpleGetRequest()
public String method()
Request
public String getMediaType()
Request
"application/octet-stream"
if not specified.getMediaType
in class Request
public SimpleGetRequest setMediaType(String mediaType)
public boolean hasParam(String key)
Request
public InputStream paramAsInputStream(String key)
paramAsInputStream
in class Request
public SimpleGetRequest setParam(String key, @Nullable String value)
Copyright © 2009–2015 SonarSource. All rights reserved.