I spent like half an hour trying to figure out how to respond to a request with a multipart/form-data content-type, but google just keeps showing me results for HANDLING multipart/form-data REQUESTS, I want to RESPOND to a request with a multipart/form-data content-type, NOT handle a request with that content-type. I'm emphasizing my goal heavily considering not only google not giving any helpful answers for what I was asking, but even ChatGPT was giving examples that were for handling multipart/form-data instead of sending it.
#How would I send a multipart/form-data content-type with Fastify?
1 messages · Page 1 of 1 (latest)
use something like https://www.npmjs.com/package/form-data
npm
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.. Latest version: 4.0.0, last published: 2 years ago. Start using form-data in your project by running npm i form-data. There are 7514 other projects in the npm registry using form-data.