Package org.apache.nifi.web.client.api
Interface MultipartFormDataStreamBuilder
- All Known Implementing Classes:
StandardMultipartFormDataStreamBuilder
public interface MultipartFormDataStreamBuilder
Multipart Form Data Stream Builder supports construction of an Input Stream with form-data sections according to RFC 7578
-
Method Summary
Modifier and TypeMethodDescriptionaddPart
(String name, HttpContentType httpContentType, byte[] bytes) Add Part using specified Name with Content-Type and byte arrayaddPart
(String name, HttpContentType httpContentType, InputStream inputStream) Add Part using specified Name with Content-Type and Streambuild()
Build Input Stream based on current component elementsGet Content-Type Header value containing multipart/form-data with boundary
-
Method Details
-
build
InputStream build()Build Input Stream based on current component elements- Returns:
- Input Stream
-
getHttpContentType
HttpContentType getHttpContentType()Get Content-Type Header value containing multipart/form-data with boundary- Returns:
- Multipart HTTP Content-Type
-
addPart
MultipartFormDataStreamBuilder addPart(String name, HttpContentType httpContentType, InputStream inputStream) Add Part using specified Name with Content-Type and Stream- Parameters:
name
- Name field of part to be addedhttpContentType
- Content-Type of part to be addedinputStream
- Stream content of part to be added- Returns:
- Builder
-
addPart
Add Part using specified Name with Content-Type and byte array- Parameters:
name
- Name field of part to be addedhttpContentType
- Content-Type of part to be addedbytes
- Byte array content of part to be added- Returns:
- Builder
-