def http = HttpBuilder.configure {
     request.uri = 'http://localhost:10101'
     request.contentType = 'text/json'
}
http.post {
     request.uri.path = '/bar'
     request.contentType = 'text/csv'
}
public static class HttpConfigs.ThreadSafeRequest extends HttpConfigs.BaseRequest
| Constructor and Description | 
|---|
ThreadSafeRequest(ChainedHttpConfig.ChainedRequest parent)  | 
| Modifier and Type | Method and Description | 
|---|---|
HttpConfigs.ThreadSafeAuth | 
getAuth()
Retrieves the authentication information for the request. 
 | 
java.lang.Object | 
getBody()  | 
java.nio.charset.Charset | 
getCharset()  | 
java.lang.String | 
getContentType()  | 
java.util.List<java.net.HttpCookie> | 
getCookies()  | 
java.util.Map<java.lang.String,java.util.function.BiConsumer<ChainedHttpConfig,ToServer>> | 
getEncoderMap()  | 
java.util.Map<java.lang.String,java.lang.CharSequence> | 
getHeaders()
Used to retrieve the request headers. 
 | 
UriBuilder | 
getUri()
Retrieves the  
UriBuilder for the request, which provides methods for more fine-grained URI specification. | 
void | 
setBody(java.lang.Object val)
The  
body property is used to configure the body content for the request. | 
void | 
setCharset(java.nio.charset.Charset val)
The  
charset property is used to specify the character set (as a Charset) used by the request. | 
void | 
setContentType(java.lang.String val)
The  
contentType property is used to specify the Content-Type header value for the request. | 
cookie, cookie, cookie, encoder, encoder, encoder, getParent, getVerb, setAccept, setAccept, setCharset, setHeaders, setRaw, setUri, setUri, setUri, setVerbclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactualAuth, actualBody, actualCharset, actualContentType, actualCookies, actualEncoder, actualHeaderscookiepublic ThreadSafeRequest(ChainedHttpConfig.ChainedRequest parent)
public java.util.List<java.net.HttpCookie> getCookies()
public java.util.Map<java.lang.String,java.util.function.BiConsumer<ChainedHttpConfig,ToServer>> getEncoderMap()
public java.lang.String getContentType()
public void setContentType(java.lang.String val)
HttpConfig.RequestThe contentType property is used to specify the Content-Type header value for the request.
def http = HttpBuilder.configure {
     request.uri = 'http://localhost:10101'
     request.contentType = 'text/json'
}
http.post {
     request.uri.path = '/bar'
     request.contentType = 'text/csv'
}
By default, the value will be text/plain. The ContentTypes class provides a helper for some of the more common content type values.
val - the content type value to be usedpublic java.nio.charset.Charset getCharset()
public void setCharset(java.nio.charset.Charset val)
HttpConfig.RequestThe charset property is used to specify the character set (as a Charset) used by the request. This value will be reflected in
the Content-Type header value (e.g. Content-Type: text/plain; charset=utf-8). A content-type value must be specified in order for this
value to be applied.
def http = HttpBuilder.configure {
     request.uri = 'http://localhost:10101'
     request.charset = 'utf-16'
}
http.post {
     request.uri.path = '/bar'
     request.charset = 'utf-8'
}
val - the content type character set value to be usedpublic UriBuilder getUri()
HttpConfig.RequestRetrieves the UriBuilder for the request, which provides methods for more fine-grained URI specification.
def http = HttpBuilder.configure {
     request.uri = 'http://localhost:10101'
}
http.get {
     request.uri.path = '/foo'
}
UriBuilder for the requestpublic java.util.Map<java.lang.String,java.lang.CharSequence> getHeaders()
HttpConfig.RequestUsed to retrieve the request headers.
Map of request headerspublic java.lang.Object getBody()
public void setBody(java.lang.Object val)
HttpConfig.RequestThe body property is used to configure the body content for the request. The request body content may be altered by configured encoders
internally or may be passed on unmodified. See HttpConfig and HttpObjectConfig for content-altering methods (encoders,
decoders and interceptors).
val - the request body contentpublic HttpConfigs.ThreadSafeAuth getAuth()
HttpConfig.RequestRetrieves the authentication information for the request.