Package com.couchbase.client.java.http
Class HttpBody
java.lang.Object
com.couchbase.client.java.http.HttpBody
The body of a POST or PUT request.
Create an instance using one of the form(java.util.Map<java.lang.String, ?>)
or json(byte[])
static factory methods, depending on the desired content type.
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpBody
form
(NameValuePair... data) Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.static HttpBody
form
(NameValuePairs data) Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.static HttpBody
form
(List<NameValuePair> data) Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.static HttpBody
Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.static HttpBody
json
(byte[] json) Creates an HTTP body with content type "application/json" and the given content.static HttpBody
Creates an HTTP body with content type "application/json" and the given content.
-
Method Details
-
json
Creates an HTTP body with content type "application/json" and the given content. -
json
Creates an HTTP body with content type "application/json" and the given content. -
form
Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.This method URL-encodes the names and values; make sure the names and values you pass in are *NOT* already URL-encoded.
-
form
Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.This method URL-encodes the names and values; make sure the names and values you pass in are *NOT* already URL-encoded.
-
form
Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.This method URL-encodes the names and values; make sure the names and values you pass in are *NOT* already URL-encoded.
-
form
Creates an HTTP body with content type "application/x-www-form-urlencoded" and the given form data.This method URL-encodes the names and values; make sure the names and values you pass in are *NOT* already URL-encoded.
-