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 Constructor Description CustomBodyDataBuilder(HttpRequestBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestBuilder
build()
Adds the multipart body to the HTTP requests builder and returns the HTTP request builder.void
overrideContentType(String contentType)
Method to override the content typeCustomBodyDataBuilder
setBodyData(StringData data)
-
-
-
Constructor Detail
-
CustomBodyDataBuilder
public CustomBodyDataBuilder(HttpRequestBuilder builder)
-
-
Method Detail
-
setBodyData
public CustomBodyDataBuilder setBodyData(StringData data)
- 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
public HttpRequestBuilder 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
-
-