request method
Future<RestResponse<C> >
request({
- required RestMethod method,
- required String path,
- Map<
String, dynamic> requestBody = const {},
override
The Uri for the request is built inside ResApi, to give flexibility on how it is used. The path parameter corresponds to the Uri path, which doesn't hold the host, port and scheme.
Implementation
@override
Future<RestResponse<C>> request({
required RestMethod method,
required String path,
Map<String, dynamic> requestBody = const {},
}) async {
return RestResponse<C>(
type: _responseType,
uri: Uri.http('', path),
content: _content,
);
}