...Think i remembered a time when Uint8Array was not supported by the request send/end method...?
I just tried to send a Uint8Array and it did work.
When did it become possible? are other typed arrays/arrayBuffer possible too?
think ☝️ needs to be updated... ref: https://nodejs.org/dist/latest-v17.x/docs/api/http.html#requestenddata-encoding-callback
Got me thinking: (bit off-topic for this issue but...)
- should it support sending the new Blob class as well - just like browser can send a blob?
req.end(new buffer.Blob(...))
- and how about sending a
URLSearchParams? req.end(new URLSearchParams(...))
suggestion: default to cast anything to string if not understood by what gets passed in? just like the fetch api?