post method
Implementation
@override
Future<Response> post(
Uri uri, {
Map<String, String>? headers,
dynamic body,
Encoding? encoding,
Duration? timeout,
}) {
return oauthClient
.post(uri, headers: headers, body: body, encoding: encoding)
.timeout(timeout ?? defaultTimeout)
.then((response) {
if (response.statusCode >= 200 && response.statusCode < 300) {
return response;
} else {
return Future.error(response);
}
});
}