auto static method
Implementation
static Request auto({
required String endpoint,
String? method,
Set<Header>? headers,
Map<String, dynamic>? body,
List<MultipartFile> files = const [],
}) {
return switch (files.isEmpty) {
true => Request.json(
endpoint: endpoint,
body: body,
headers: headers,
),
false => Request.formData(
endpoint: endpoint,
body: body,
files: files,
),
};
}