Send a request with form-data array

I want to send an email using MailGun API. It accepts an array of attachment. However, I can’t do it using context.http.post, because the context expect every item to be a string! How can I send multiple fields in the same form-data field?

I tried using axios, no success (hangs forever and timeout). Tried mailgun.js, no success.

Can you please enable the context HTTP to accept form data array? Or any advice to make it work?

I want to do something like:

formData.append(‘attachment’, attach1);
formData.append(‘attachment’, attach2);

1 Like