Add javadsl FormData.create(Iterable) overload #21303 (#21344)

This commit is contained in:
Matthias Lüneberg 2016-09-13 10:19:37 +02:00 committed by Konrad Malawski
parent 47433bc65c
commit a88c8a0bbe

View file

@ -4,9 +4,10 @@
package akka.http.javadsl.model;
import akka.japi.Pair;
import java.util.Map;
import akka.japi.Pair;
/**
* Simple model for `application/x-www-form-urlencoded` form data.
*/
@ -51,4 +52,11 @@ public final class FormData {
public static FormData create(Map<String, String> params) {
return new FormData(Query.create(params));
}
/**
* Creates a FormData from the given parameters.
*/
public static FormData create(Iterable<Pair<String, String>> params) {
return new FormData(Query.create(params));
}
}