Closed juanagu closed 1 year ago
Possible solution:
params.forEach((k, v) {
String val;
if (v is List) {
val = Uri.encodeComponent(v.map((p) => p.trim()).join(' '));
} else if (v is Map) {
val = jsonEncode(v);
} else {
val = v.toString().trim();
}
qsList.add(k + '=' + val);
});
@juanagu thank you, you are right, I will add the patch in the next release
Hello, I'm trying to use the next params
The function params2qs should check if the value is String before to do a
v.trim()