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.
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 aReadableStream
, orFormData
for browsers, and allow specifying content-type header.