Package de.xima.fc.http
Class CustomBodyDataBuilder
java.lang.Object
de.xima.fc.http.CustomBodyDataBuilder
- All Implemented Interfaces:
ICustomBodyDataBuilder<CustomBodyDataBuilder>
,IHttpBodyBuilder
public class CustomBodyDataBuilder
extends Object
implements ICustomBodyDataBuilder<CustomBodyDataBuilder>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Adds the multipart body to the HTTP requests builder and returns the HTTP request builder.void
overrideContentType
(String contentType) Method to override the content typesetBodyData
(StringData data)
-
Constructor Details
-
CustomBodyDataBuilder
-
-
Method Details
-
setBodyData
- Specified by:
setBodyData
in interfaceICustomBodyDataBuilder<CustomBodyDataBuilder>
- Parameters:
data
- The custom data string to set to the body- Returns:
- This builder for chaining method calls.
-
build
Description copied from interface:IHttpBodyBuilder
Adds the multipart body to the HTTP requests builder and returns the HTTP request builder.- Specified by:
build
in interfaceIHttpBodyBuilder
- Returns:
- The HTTP request builder that was used to create this body builder.
-
overrideContentType
public void overrideContentType(String contentType) throws org.apache.http.ParseException, UnsupportedCharsetException Description copied from interface:ICustomBodyDataBuilder
Method to override the content type- Specified by:
overrideContentType
in interfaceICustomBodyDataBuilder<CustomBodyDataBuilder>
- Parameters:
contentType
- The content type to set- Throws:
org.apache.http.ParseException
- On errors while parsing the content typeUnsupportedCharsetException
- On errors while parsing the charset for the content type
-