|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.AbstractHttpContent
com.google.api.client.http.UrlEncodedContent
public class UrlEncodedContent
Implements support for HTTP form content encoding serialization of type application/x-www-form-urlencoded as specified in the HTML 4.0 Specification.
Sample usage:
static void setContent(HttpRequest request, Object item) {
request.setContent(new UrlEncodedContent(item));
}
Implementation is not thread-safe.
| Constructor Summary | |
|---|---|
UrlEncodedContent(Object data)
|
|
| Method Summary | |
|---|---|
Object |
getData()
Returns the key name/value data or null for none. |
String |
getType()
Returns the content type or null for none. |
UrlEncodedContent |
setData(Object data)
Sets the key name/value data or null for none. |
UrlEncodedContent |
setType(String type)
Sets the content type or null for none. |
void |
writeTo(OutputStream out)
Writes the content to the given output stream. |
| Methods inherited from class com.google.api.client.http.AbstractHttpContent |
|---|
computeLength, getEncoding, getLength, retrySupported |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UrlEncodedContent(Object data)
data - key name/value data or null for none| Method Detail |
|---|
public String getType()
HttpContentnull for none.
public void writeTo(OutputStream out)
throws IOException
HttpContent
IOExceptionpublic UrlEncodedContent setType(String type)
null for none.
Defaults to UrlEncodedParser.CONTENT_TYPE.
public Object getData()
null for none.
public UrlEncodedContent setData(Object data)
null for none.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||