1.0.1
This commit is contained in:
parent
b70b881e85
commit
2f7663abd2
3 changed files with 9 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
# Body Parser
|
||||

|
||||

|
||||
|
||||
Parse request bodies and query strings in Dart, as well multipart/form-data uploads. No external
|
||||
|
|
|
@ -10,7 +10,8 @@ buildMapFromUri(Map map, String body) {
|
|||
if (keyValuePair.contains('=')) {
|
||||
var equals = keyValuePair.indexOf('=');
|
||||
String key = Uri.decodeQueryComponent(keyValuePair.substring(0, equals));
|
||||
String value = keyValuePair.substring(equals + 1); //Uri.decodeQueryComponent(split[1]);
|
||||
String value =
|
||||
Uri.decodeQueryComponent(keyValuePair.substring(equals + 1));
|
||||
|
||||
if (parseArrayRgx.hasMatch(key)) {
|
||||
Match queryMatch = parseArrayRgx.firstMatch(key);
|
||||
|
@ -34,8 +35,9 @@ buildMapFromUri(Map map, String body) {
|
|||
targetMap[keys[i]] = getValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else map[key] = getValue(value);
|
||||
} else map[Uri.decodeQueryComponent(keyValuePair)] = true;
|
||||
} else
|
||||
map[key] = getValue(value);
|
||||
} else
|
||||
map[Uri.decodeQueryComponent(keyValuePair)] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: body_parser
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
description: Parse request bodies and query strings in Dart.
|
||||
homepage: https://github.com/thosakwe/body_parser
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue