org.apache.hc.client5.http.entity.mime

## Class FormBodyPartBuilder

- java.lang.Object
- - org.apache.hc.client5.http.entity.mime.FormBodyPartBuilder

    public class FormBodyPartBuilder
    extends Object

Builder for individual `FormBodyPart`s.

Since:
  4.4

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`FormBodyPartBuilder` `addField(String name, String value)`
`FormBodyPartBuilder` `addField(String name, String value, List<NameValuePair> parameters)`
`FormBodyPart` `build()`
`static FormBodyPartBuilder` `create()`
`static FormBodyPartBuilder` `create(String name, ContentBody body)`
`static FormBodyPartBuilder` `create(String name, ContentBody body, HttpMultipartMode mode)` Creates a new builder instance with the specified name, content body, and multipart mode.
`FormBodyPartBuilder` `removeFields(String name)`
`FormBodyPartBuilder` `setBody(ContentBody body)`
`FormBodyPartBuilder` `setField(String name, String value)`
`FormBodyPartBuilder` `setName(String name)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### create

    public static FormBodyPartBuilder create(String name,
                                             ContentBody body,
                                             HttpMultipartMode mode)

Creates a new builder instance with the specified name, content body, and multipart mode.

Parameters:
  `name` - the name of the form field
  `body` - the content body of the part
  `mode` - the `HttpMultipartMode` to use, determining filename encoding behavior;
Returns:
  a new `FormBodyPartBuilder` instance
Since:
  5.5

#### create

    public static FormBodyPartBuilder create(String name,
                                             ContentBody body)

#### create

    public static FormBodyPartBuilder create()

#### setName

    public FormBodyPartBuilder setName(String name)

#### setBody

    public FormBodyPartBuilder setBody(ContentBody body)

#### addField

    public FormBodyPartBuilder addField(String name,
                                        String value,
                                        List<NameValuePair> parameters)

Since:
  4.6

#### addField

    public FormBodyPartBuilder addField(String name,
                                        String value)

#### setField

    public FormBodyPartBuilder setField(String name,
                                        String value)

#### removeFields

    public FormBodyPartBuilder removeFields(String name)

#### build

    public FormBodyPart build()