Make a private final field with getter public (#356)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed29775..119227f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.12.0+4-dev
+
+* Internal changes.
+
## 0.12.0+3
* Documentation fixes.
diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart
index 0cf13b4..699c643 100644
--- a/lib/src/multipart_request.dart
+++ b/lib/src/multipart_request.dart
@@ -43,13 +43,11 @@
/// The form fields to send for this request.
final fields = <String, String>{};
- final _files = <MultipartFile>[];
+ /// The list of files to upload for this request.
+ final files = <MultipartFile>[];
MultipartRequest(String method, Uri url) : super(method, url);
- /// The list of files to upload for this request.
- List<MultipartFile> get files => _files;
-
/// The total length of the request body, in bytes.
///
/// This is calculated from [fields] and [files] and cannot be set manually.
@@ -66,7 +64,7 @@
'\r\n'.length;
});
- for (var file in _files) {
+ for (var file in files) {
length += '--'.length +
_boundaryLength +
'\r\n'.length +
@@ -105,7 +103,7 @@
yield line;
}
- for (final file in _files) {
+ for (final file in files) {
yield separator;
yield utf8.encode(_headerForFile(file));
yield* file.finalize();
diff --git a/pubspec.yaml b/pubspec.yaml
index 57e6374..f14a504 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: http
-version: 0.12.0+3
+version: 0.12.0+4-dev
homepage: https://github.com/dart-lang/http
description: A composable, multi-platform, Future-based API for HTTP requests.