postString method
Implementation
Future<String> postString(dynamic url,
{Map<String, String>? body,
Map<String, String> headers = const {},
bool validate = true}) async {
assert(url is String || url is Uri);
if (url is String) {
url = Uri.parse(url);
}
var response = await post(url, headers: headers, body: body);
if (_closed) throw HttpClientClosedException();
if (validate) {
_validateResponse(response, response.statusCode);
}
return response.body;
}