I want to upload a file via a non-multipart/form-data
request like this:
POST http://127.0.0.1/uploadCache-Control: no-cache< /path/to/file/in/disk
(I tested and it successfully uploaded a file from JetBrain Rider's REST client to my REST endpoint.)
There is a StreamedRequest
class in http
package but I didn't find any constructor or setter to plug a byte stream or file content into it.
How do I use StreamedRequest
to upload a file in Dart?