post method
Implementation
Future<http.Response> post(String path,
{authenticated = true,
Map<String, dynamic>? json,
Map<String, dynamic>? queryParameters,
Map<String, String>? headers}) {
// build request
final url = _buildUrl(path, queryParameters: queryParameters);
final request = http.Request("POST", url);
if (headers != null) request.headers.addAll(headers);
// json body
if (json != null) {
request.body = jsonEncode(json);
request.headers["content-type"] = "application/json";
}
// request
return this.request(request, authenticated: authenticated);
}