JsonHttpContent
instead.@Deprecated public final class JsonCContent extends com.google.api.client.http.json.JsonHttpContent
"data"
envelope.
Warning: this should only be used by some older Google APIs that wrapped the response in a
"data"
envelope. All newer Google APIs don't use this envelope, and for those APIs
JsonHttpContent
should be used instead.
Sample usage:
static void setContent(HttpRequest request, Object data) { JsonCContent content = new JsonCContent(new JacksonFactory(), data); request.setContent(content); }
Implementation is not thread-safe.
Constructor and Description |
---|
JsonCContent(com.google.api.client.json.JsonFactory jsonFactory,
Object data)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
JsonCContent |
setMediaType(com.google.api.client.http.HttpMediaType mediaType)
Deprecated.
|
void |
writeTo(OutputStream out)
Deprecated.
|
getData, getJsonFactory, getWrapperKey, setWrapperKey
public JsonCContent(com.google.api.client.json.JsonFactory jsonFactory, Object data)
jsonFactory
- JSON factory to usedata
- JSON key name/value datapublic void writeTo(OutputStream out) throws IOException
writeTo
in interface com.google.api.client.http.HttpContent
writeTo
in interface com.google.api.client.util.StreamingContent
writeTo
in class com.google.api.client.http.json.JsonHttpContent
IOException
public JsonCContent setMediaType(com.google.api.client.http.HttpMediaType mediaType)
setMediaType
in class com.google.api.client.http.json.JsonHttpContent
Copyright © 2010-2013 Google. All Rights Reserved.