post method
Makes a POST request with an optional body.
Implementation
Future<TestResponse> post(String path, {Map<String, String>? headers, dynamic body}) async {
await _ensureStarted();
final res = await http.post(
Uri.parse('http://localhost:$_port$path'),
headers: headers,
body: body is Map ? jsonEncode(body) : body,
);
return TestResponse(res);
}