public abstract class HttpKeyValueEntityRequest extends AbstractHttpRequest
This HttpRequest is used to send http body entity in text from. This
is normally used for HTTP POST, PUT. It simply contains a key - value map for
transmitting data as HTTP POST or PUT parameter with the corresponding value
to the web server. However you should not use this base class but use
the concrete classes like HttpPostKeyValueRequest or
HttpPutKeyValueRequest, because they may also add more http method
specific http headers
Only text values are transmitted as URLEncoded strings. For Transmitting
binary data, or multipart you must use another HttpRequest
implementation
HttpRequest.CanceledListener, HttpRequest.PriorityChangedListenerurl, urlParametersCACHE_ALLOW_STALE, CACHE_FORCE, CACHE_FROM_DISK, CACHE_FROM_MEMORY, CACHE_OFFLINE_ALLOW_EXPIRED, CACHE_TO_DISK, CACHE_TO_MEMORY, HTTP_METHOD_DELETE, HTTP_METHOD_GET, HTTP_METHOD_POST, HTTP_METHOD_PUT, PRIORITY_HIGH, PRIORITY_HIGHEST, PRIORITY_LOW, PRIORITY_LOWEST, PRIORITY_NORMAL| Constructor and Description |
|---|
HttpKeyValueEntityRequest(String url,
String httpMethod)
Creates a new object
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCharsetEncoding() |
Set<Map.Entry<String,String>> |
getKeyValues()
Get the entry set of the key value map
|
int |
getKeyValuesCount()
Get the count of how many
|
protected String |
getParamsString()
Returns the parameters name and value in a string that can be sent with
the http request to transmit the parameters
|
String |
putParam(String key,
boolean value) |
String |
putParam(String key,
char value) |
String |
putParam(String key,
double value) |
String |
putParam(String key,
float value) |
String |
putParam(String key,
int value) |
String |
putParam(String key,
long value) |
String |
putParam(String key,
short value) |
String |
putParam(String key,
String value) |
void |
setCharsetEnconding(String encoding) |
String |
toString() |
cancel, compareTo, doAdditionalResponseProcessing, equals, getCachedResultFor304, getConnectingTimeout, getCreationTimestamp, getHttpHeaders, getHttpMethod, getOverrideResponseCacheControl, getOwner, getParseCondition, getParseIntoClass, getParseIntoCollectionType, getParserWriter, getPriority, getReadingResponseTimeout, getResponseContentCharset, getResponseContentType, getUrl, getUrlEncodingCharset, getUrlParamsString, hashCode, isAllowStaleData, isCanceled, isFollowRedirection, isForceFromCache, isOnOfflineAllowExpiredCacheValue, isOnOfflineFromCache, isReadDiskCache, isReadMemoryCache, isWithoutCacheLookup, isWriteDiskCache, isWriteMemoryCache, putUrlParam, putUrlParam, putUrlParam, putUrlParam, putUrlParam, putUrlParam, putUrlParam, putUrlParamAsString, setAllowStaleData, setCachedResultFor304, setCanceledListener, setConnectingTimeout, setFollowRedirection, setForceFromCache, setHttpMethod, setOnOfflineAllowExpiredCacheValue, setOnOfflineFromCache, setOverrideResponseCacheControl, setOwner, setParseCondition, setParseInto, setParseInto, setParserWriter, setPriority, setPriorityChangedListener, setReadDiskCache, setReadingResponseTimeout, setReadMemoryCache, setResponseContentCharset, setResponseContentType, setUrl, setUrlEncodingCharset, setWithoutCacheLookup, setWriteDiskCache, setWriteMemoryCachepublic HttpKeyValueEntityRequest(String url, String httpMethod)
httpMethod - Should be HttpRequest.HTTP_METHOD_POST etc.public String getCharsetEncoding()
public void setCharsetEnconding(String encoding)
protected String getParamsString()
public int getKeyValuesCount()
public Set<Map.Entry<String,String>> getKeyValues()
public String toString()
toString in class AbstractHttpRequestCopyright © 2015 Hannes Dorfmann. All rights reserved.