form_data 1.0.0-nullsafety.1 form_data: ^1.0.0-nullsafety.1 copied to clipboard
multipart/form-data builder for Dart aiming to be compatible with RFC 7578.
import 'dart:io';
import 'package:form_data/form_data.dart';
void main() {
var formData = FormData()
..add('field name', 'value')
..add('primitive types', 42)
..addBytes('my file', File(Platform.script.path).readAsBytesSync(),
filename: 'form_data.dart');
print(formData.contentType);
print(formData.contentLength);
print(formData.body);
}