post method

Future<Response> post(
  1. dynamic url, {
  2. Map<String, String>? headers,
  3. required dynamic body,
  4. Encoding? encoding,
})

Implementation

Future<Response> post(url,
    {Map<String, String>? headers, required body, Encoding? encoding}) {
  RequestData data = _sendInterception(
      method: Method.POST,
      headers: headers,
      url: url,
      body: body,
      encoding: encoding);
  return _withClient<Response>((client) => client.post(Uri.parse(data.url),
      headers: data.headers, body: data.body, encoding: data.encoding));
}