reactivefeign.utils.FormUtils Maven / Gradle / Ivy
package reactivefeign.utils;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Collection;
import java.util.Map;
import static java.util.Collections.singletonList;
public class FormUtils {
public static SerializedFormData serializeForm(Map formData, Charset charset) {
StringBuilder builder = new StringBuilder();
formData.forEach((name, values) ->
(values instanceof Collection ? (Collection