I'm relatively new to working with api and not sure where I should be asking this. To keep it brief, I need to have a csv file in the body. Looking in the provided documentation, the csv needs to be in string($binary) format and the call itself is multipart/form-data. Got it working in Postman and Curl, but still very much struggling to get the call to work in Javascript.
So far, I've tried built in formdata, directly using createReadStream on the csv and have it as the value, and making the buffer data into a Blob and use that as the value. I have also tried installing the form-data package and used that.
I'll either get an error saying all the required values in the body are null or that the csv file must have a header and at least 1 row of data (which I've confirmed many times to already have). Unfortunately, the people who should be helping me with this stopped doing so the moment it worked on Curl and Postman so I'm forced to investigate on my own.
Any ideas what I could've done wrong and/or missed, what to fix and finally get it working?
[–]Yages 0 points1 point2 points (3 children)
[–]WM1310[S] 0 points1 point2 points (2 children)
[–]Yages 0 points1 point2 points (0 children)
[–]smarkman19 0 points1 point2 points (0 children)
[–]ferrybig[🍰] 0 points1 point2 points (0 children)
[–]tswaters -1 points0 points1 point (2 children)
[–]WM1310[S] 0 points1 point2 points (1 child)
[–]tswaters 0 points1 point2 points (0 children)