Class HttpRequestUniBody
- All Implemented Interfaces:
Body, HttpRequest<RequestBodyEntity>, RequestBodyEntity
-
Field Summary
FieldsFields inherited from class BaseRequest
config, headers, method, url -
Constructor Summary
ConstructorsConstructorDescriptionHttpRequestUniBody(HttpRequestBody httpRequest) HttpRequestUniBody(HttpRequestUniBody httpRequest) -
Method Summary
Modifier and TypeMethodDescriptionbody(byte[] bodyBytes) Set a byte array as the body of the requestbody(InputStream inputStreamBody) Set a InputStream as the bodySet a Object as the body of the request.Set a String as the body of the requestbody(JSONElement jsonBody) Set JSON on the bodySet JSON on the bodySet the Charset encoding for the Content-Type.contentType(String type) getBody()booleanbooleanuniPart()uploadMonitor(ProgressMonitor progressMonitor) Set a Progress upload monitor suitable for drawing progress bars and whatnot.Methods inherited from class BaseRequest
accept, asBytes, asBytesAsync, asBytesAsync, asEmpty, asEmptyAsync, asEmptyAsync, asFile, asFileAsync, asFileAsync, asJson, asJsonAsync, asJsonAsync, asObject, asObject, asObject, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asPaged, asString, asStringAsync, asStringAsync, basicAuth, cookie, cookie, cookie, downloadMonitor, equals, getCreationTime, getDownloadMonitor, getHeaders, getHttpMethod, getObjectMapper, getPath, getRequestTimeout, getUrl, getVersion, hashCode, header, headerReplace, headers, headersReplace, queryString, queryString, queryString, requestTimeout, responseEncoding, routeParam, routeParam, thenConsume, thenConsumeAsync, toSummary, version, withObjectMapperMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Body
getBoundary, getField, getMode, multiPartsMethods inherited from interface HttpRequest
accept, accept, asBytes, asBytesAsync, asBytesAsync, asEmpty, asEmptyAsync, asEmptyAsync, asFile, asFileAsync, asFileAsync, asJson, asJsonAsync, asJsonAsync, asObject, asObject, asObject, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asPaged, asString, asStringAsync, asStringAsync, basicAuth, cookie, cookie, cookie, downloadMonitor, getCreationTime, getHeaders, getHttpMethod, getRequestTimeout, getUrl, getVersion, header, headerReplace, headers, headersReplace, queryString, queryString, queryString, requestTimeout, responseEncoding, routeParam, routeParam, thenConsume, thenConsumeAsync, toSummary, version, withObjectMapperMethods inherited from interface RequestBodyEntity
noCharset
-
Field Details
-
body
-
charSet
-
monitor
-
-
Constructor Details
-
HttpRequestUniBody
HttpRequestUniBody(HttpRequestBody httpRequest) -
HttpRequestUniBody
HttpRequestUniBody(HttpRequestUniBody httpRequest)
-
-
Method Details
-
body
Description copied from interface:RequestBodyEntitySet JSON on the body- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
jsonBody- the JsonNode- Returns:
- this request builder
-
body
Description copied from interface:RequestBodyEntitySet a InputStream as the body- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
inputStreamBody- the Object- Returns:
- this request builder
-
body
Description copied from interface:RequestBodyEntitySet JSON on the body- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
jsonBody- the JSONElement- Returns:
- this request builder
-
body
Description copied from interface:RequestBodyEntitySet a Object as the body of the request. This will be serialized with one of the following methods: - Strings are native - JSONElements use their native toString - Everything else will pass through the supplied ObjectMapper- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
objectBody- the Object- Returns:
- this request builder
-
body
Description copied from interface:RequestBodyEntitySet a String as the body of the request- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
bodyAsString- the String- Returns:
- this request builder
-
body
Description copied from interface:RequestBodyEntitySet a byte array as the body of the request- Specified by:
bodyin interfaceRequestBodyEntity- Parameters:
bodyBytes- the byte[]- Returns:
- this request builder
-
charset
Description copied from interface:RequestBodyEntitySet the Charset encoding for the Content-Type. This is appended to the Content-Type Header (e.g. application/x-www-form-urlencoded; charset=US-ASCII) Default is UTF-8- Specified by:
charsetin interfaceRequestBodyEntity- Parameters:
charset- the charset- Returns:
- this request builder
-
contentType
- Specified by:
contentTypein interfaceRequestBodyEntity- Parameters:
type- The content mime type- Returns:
- this request builder
-
uploadMonitor
Description copied from interface:RequestBodyEntitySet a Progress upload monitor suitable for drawing progress bars and whatnot. Works With- Specified by:
uploadMonitorin interfaceRequestBodyEntity- Parameters:
progressMonitor- a monitor- Returns:
- The same MultipartBody
-
getBody
- Specified by:
getBodyin interfaceHttpRequest<RequestBodyEntity>- Returns:
- if the request has a body it will be here.
-
getCharset
- Specified by:
getCharsetin interfaceBody
-
isMultiPart
public boolean isMultiPart()- Specified by:
isMultiPartin interfaceBody
-
isEntityBody
public boolean isEntityBody()- Specified by:
isEntityBodyin interfaceBody
-
uniPart
-
getMonitor
- Specified by:
getMonitorin interfaceBody
-