/** * Appends the specified name/value pair to the end of this list. * * <p> * The value is converted to UON notation using the {@link UrlEncodingSerializer} defined on the client. * * @param name The pair name. * @param value The pair value. * @param serializer * The serializer to use for serializing the value to a string value. * @param schema * The schema object that defines the format of the output. * <br>If <jk>null</jk>, defaults to the schema defined on the parser. * <br>If that's also <jk>null</jk>, defaults to {@link HttpPartSchema#DEFAULT}. * <br>Only used if serializer is schema-aware (e.g. {@link OpenApiSerializer}). * @return This object (for method chaining). */ public NameValuePairs append(String name, Object value, HttpPartSerializer serializer, HttpPartSchema schema) { super.add(new SerializedNameValuePair(name, value, serializer, schema)); return this; } }
/** * Appends the specified name/value pair to the end of this list. * * <p> * The value is converted to UON notation using the {@link UrlEncodingSerializer} defined on the client. * * @param name The pair name. * @param value The pair value. * @param serializer * The serializer to use for serializing the value to a string value. * @param schema * The schema object that defines the format of the output. * <br>If <jk>null</jk>, defaults to the schema defined on the parser. * <br>If that's also <jk>null</jk>, defaults to {@link HttpPartSchema#DEFAULT}. * <br>Only used if serializer is schema-aware (e.g. {@link OpenApiSerializer}). * @return This object (for method chaining). */ public NameValuePairs append(String name, Object value, HttpPartSerializer serializer, HttpPartSchema schema) { super.add(new SerializedNameValuePair(name, value, serializer, schema)); return this; } }
/** * Appends the specified name/value pair to the end of this list. * * <p> * The value is converted to UON notation using the {@link UrlEncodingSerializer} defined on the client. * * @param name The pair name. * @param value The pair value. * @param serializer * The serializer to use for serializing the value to a string value. * @param schema * The schema object that defines the format of the output. * <br>If <jk>null</jk>, defaults to the schema defined on the parser. * <br>If that's also <jk>null</jk>, defaults to {@link HttpPartSchema#DEFAULT}. * <br>Only used if serializer is schema-aware (e.g. {@link OpenApiSerializer}). * @return This object (for method chaining). */ public NameValuePairs append(String name, Object value, HttpPartSerializer serializer, HttpPartSchema schema) { super.add(new SerializedNameValuePair(name, value, serializer, schema)); return this; } }
if (! isMulti) { if (canAdd(value, schema, skipIfEmpty)) formData.add(new SerializedNameValuePair(name, value, serializer, schema)); } else if (value instanceof NameValuePairs) { for (NameValuePair p : (NameValuePairs)value) {
if (! isMulti) { if (canAdd(value, schema, skipIfEmpty)) formData.add(new SerializedNameValuePair(name, value, serializer, schema)); } else if (value instanceof NameValuePairs) { for (NameValuePair p : (NameValuePairs)value) {
if (! isMulti) { if (canAdd(value, schema, skipIfEmpty)) formData.add(new SerializedNameValuePair(name, value, serializer, schema)); } else if (value instanceof NameValuePairs) { for (NameValuePair p : (NameValuePairs)value) {