public static interface RequestEntity.BodyBuilder extends RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>
Modifier and Type | Method and Description |
---|---|
<T> RequestEntity<T> |
body(T body)
Set the body of the request entity and build the RequestEntity.
|
RequestEntity.BodyBuilder |
contentLength(long contentLength)
Set the length of the body in bytes, as specified by the
Content-Length header. |
RequestEntity.BodyBuilder |
contentType(MediaType contentType)
Set the media type of the body, as specified
by the
Content-Type header. |
accept, acceptCharset, build, header, ifModifiedSince, ifNoneMatch
RequestEntity.BodyBuilder contentLength(long contentLength)
Content-Length
header.contentLength
- the content lengthHttpHeaders.setContentLength(long)
RequestEntity.BodyBuilder contentType(MediaType contentType)
Content-Type
header.contentType
- the content typeHttpHeaders.setContentType(MediaType)
<T> RequestEntity<T> body(T body)
T
- the type of the bodybody
- the body of the request entity