post static method

Response post(
  1. Uri uri, {
  2. Map<String, String>? headers,
  3. Object? body,
  4. Encoding? encoding,
})

send HTTP POST request

first parameter a URI is required, when using this method send URL like this Uri.parse(HttpRoutingSimulator.BASE_URL + #endpoint)

HttpRoutingSimulator.BASE_URL = http://localhost

if you need to send request body please add to method (body: yourRequest)

the method will return Response contain body if there and the http status

Implementation

static http.Response post(Uri uri,
    {Map<String, String>? headers, Object? body, Encoding? encoding}) {
  return _call(uri, body: body, method: "POST");
}