formData method
Implementation
Future<FormData> formData() {
return switch (body) {
final Body body => FormData.parse(
body,
contentType: headers.get('content-type'),
),
null => Future<FormData>.error(
const FormatException('Cannot decode form data from an empty body.'),
),
};
}