doPost method

Future<Response> doPost(
  1. String url,
  2. String body, {
  3. Map<String, String>? headers,
})
inherited

Implementation

Future<Response> doPost(
  String url,
  String body, {
  Map<String, String>? headers,
}) {
  final postHeaders = {
    'Content-type': 'application/json',
  };
  if (headers != null) postHeaders.addAll(headers);
  return httpClient.post(Uri.parse(url), body: body, headers: postHeaders);
}