post<T> method
Sends an HTTP POST request to path with optional body and decodes the JSON response as T.
Example:
final created = await client.post<Map<String, dynamic>>('/api/users', body: {'name': 'Jane'});
Implementation
Future<T> post<T>(
String path, {
dynamic body,
Map<String, String>? headers,
Map<String, dynamic>? queryParameters,
}) async {
final res = await _send('POST', path, body: body, headers: headers, queryParameters: queryParameters);
return res as T;
}