form_data 0.0.1-nullsafety.0 form_data: ^0.0.1-nullsafety.0 copied to clipboard
Form data parser and builder for Dart
import 'dart:io';
import 'package:form_data/form_data.dart';
void main() {
var formData = FormData()
..add('field name', 'value')
..add('primitive types', 42)
..addFile('my file', File(Platform.script.path).readAsBytesSync(),
filename: 'form_data.dart');
print(formData.contentType);
print(formData.contentLength);
print(formData.body);
}