draftbit / twitter-lite

A tiny, full-featured, flexible client / server library for the Twitter API
https://npm.im/twitter-lite
MIT License
794 stars 96 forks source link

Allow POST of multipart/form-data #158

Open deadbeef84 opened 3 years ago

deadbeef84 commented 3 years ago

It would be great if the client.post(endpoint, parameters) method allowed sending multipart form data, e.g for media upload.

One way to do it, and put the responsibility on the user, would be to allow parameters to be a ReadableStream, or FormData for browsers, and allow specifying content-type header.