postFilesWithDataRequest<T> method
Implementation
Future<HtpioResponse<T>> postFilesWithDataRequest<T>({
required String endpoint,
required String fileJsonKey,
required List<File> files,
required Map<String, String>? data,
required T Function(Map<String, dynamic>) fromJson,
}) async {
Map<String, String> headers = {
'Content-Type': 'multipart/form-data',
};
log('REQUEST TO : $endpoint');
log('Headers: $headers');
final request = HtpioRequest<T>(
url: endpoint,
method: 'POST',
headers: headers,
files: files,
body: data,
fromJson: fromJson,
);
return send(request);
}