We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e89a0a commit 48e4c8aCopy full SHA for 48e4c8a
lib/src/request.dart
@@ -143,17 +143,15 @@ class Request extends Message {
143
144
var boundary = _boundaryString();
145
146
- headers ??= <String, String>{};
147
- headers['content-type'] = 'multipart/form-data; boundary=$boundary';
148
-
149
return new Request._(
150
- 'POST',
151
- url,
152
- new MultipartBody(fields, files, boundary),
153
- null,
154
- headers,
155
- context,
156
- );
+ 'POST',
+ url,
+ new MultipartBody(fields, files, boundary),
+ null,
+ updateMap(headers, <String, String>{
+ 'content-type': 'multipart/form-data; boundary=$boundary'
+ }),
+ context);
157
}
158
159
Request._(this.method, this.url,
0 commit comments