Modifiers | Name | Description |
---|---|---|
static class |
HttpClientRequestBuilder.FormDataBuilder |
|
static class |
HttpClientRequestBuilder.MultipartBuilder |
Helps with building multipart requests |
Constructor and description |
---|
HttpClientRequestBuilder
(io.reactivex.netty.protocol.http.client.HttpClientRequest request, java.nio.charset.Charset charset) |
Type | Name and description |
---|---|
HttpClientRequestBuilder |
accept(java.lang.CharSequence... contentTypes) Sets the Accept HTTP header to the given value. |
HttpClientRequestBuilder |
auth(java.lang.String username, java.lang.String password) Used to configure BASIC authentication. |
HttpClientRequestBuilder |
auth(java.lang.CharSequence accessToken) Sets the Authorization HTTP header to the given value. |
HttpClientRequestBuilder |
contentType(java.lang.CharSequence contentType) Sets the content type for the request |
protected java.util.Observable |
createBodyWriter(groovy.lang.Closure callable) // * Builds a form // * @return this object //
|
HttpClientRequestBuilder |
header(java.lang.CharSequence name, java.lang.Object value) Sets a request header |
HttpClientRequestBuilder |
json(groovy.lang.Closure callable) Adds JSON to the body of the request |
HttpClientRequestBuilder |
json(java.util.List array) Adds JSON to the body of the request |
HttpClientRequestBuilder |
json(java.util.Map json) Adds JSON to the body of the request |
HttpClientRequestBuilder |
json(java.lang.String json) Adds JSON to the body of the request |
HttpClientRequestBuilder |
method(java.lang.CharSequence method) Sets the method of the request |
HttpClientRequestBuilder |
uri(java.lang.CharSequence uri) Sets the URI of the request |
HttpClientRequestBuilder |
xml(java.lang.String xml) Sets the body of the request to the XML string argument. |
HttpClientRequestBuilder |
xml(groovy.lang.Closure closure) Sets the body of the request to the XML defined by the closure. |
HttpClientRequestBuilder |
xml(groovy.util.slurpersupport.GPathResult xml) Sets the body of the request to the XML GPathResult argument. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Sets the Accept HTTP header to the given value. Example:
restBuilder.get("http://..") {* accept "application/xml"
}*
contentTypes
- The content typesUsed to configure BASIC authentication. Example:
builder.put("http://..") {* auth "myuser", "mypassword"
}*
username
- The usernamepassword
- The passwordSets the Authorization HTTP header to the given value. Used typically to pass OAuth access tokens.
builder.put("http://..") {* auth myToken
}*
accessToken
- The access tokenSets the content type for the request
contentType
- The content type// * Builds a form // *
formDefinition
- The form definition
// *Sets a request header
name
- The name of the headervalue
- The value of the headerAdds JSON to the body of the request
callable
- The callable that defines the JSONAdds JSON to the body of the request
array
- The JSON arrayAdds JSON to the body of the request
json
- The JSON as a mapAdds JSON to the body of the request
json
- The JSON as a mapSets the method of the request
method
- The HTTP methodSets the URI of the request
uri
- The uriTemplate of the requestSets the body of the request to the XML string argument.
xml
- The XML to be used as the body of the requestSets the body of the request to the XML defined by the closure. Uses groovy.xml.StreamingMarkupBuilder to produce the XML
closure
- The closure that defines the XMLSets the body of the request to the XML GPathResult argument.
xml
- The XML to be used as the body of the request