http
http copied to clipboard
`MediaType` is not exported to parent project
When I use MultipartFile constructors I could not specify the contentType property because MediaType from http_parser package is used internally in multipart_file.dart file and not exported into the target project.
I just ran into this. Also see #342 and #296.
You can fix this by including the http_parser library (although I'm also curious if it's worth re-exporting MediaType as part of the http package).
import 'package:http_parser/http_parser.dart';
// or
import 'package:http_parser/http_parser.dart' show MediaType;
Yes. I did so but it is strange to import a whole additional package just for import the data type which is used by class from http, isn't it?