Class MultiPartFormContent


  • public class MultiPartFormContent
    extends HttpContent
    • Constructor Detail

      • MultiPartFormContent

        public MultiPartFormContent()
      • MultiPartFormContent

        public MultiPartFormContent​(java.lang.String boundary)
    • Method Detail

      • addPart

        public MultiPartFormContent addPart​(java.lang.String name,
                                            HttpContent content,
                                            @Nullable
                                            java.lang.String fileName)
        Add a new part to the form data.
        Parameters:
        name - The name of the part
        content - The content of the part
        fileName - The file name of the part
        Returns:
        This instance for chaining
      • compute

        @Nonnull
        protected byte[] compute()
                          throws java.io.IOException
        Specified by:
        compute in class HttpContent
        Returns:
        The content
        Throws:
        java.io.IOException - If an I/O error occurs