request method
Future
request(
{ - bool getResponseBytes = false,
})
Implementation
Future<dynamic> request({bool getResponseBytes = false}) async {
log(uri.toString());
log(json.encode(body));
http.MultipartRequest request = MultipartRequest(method, uri, onProgress: (int? bytes, int? totalBytes) {
FastHttp.requestProgressStream.add((bytes,totalBytes));
});
request.fields.addAll(body.map((key, value) => MapEntry(key, value.toString())));
request.files.addAll(files);
if (headers != null) request.headers.addAll(headers!);
return await _ApiBaseHelper(request: request, requestApi: this, getResponseBytes: getResponseBytes,).call();
}