Posting an array to Post/Put API with FromForm parameter

Hi @DarkJoxie,

A lot of the specifics are going to depend on your specific API and what it was developed to accept. In cases where I need a more flexible body configuration than what's available with the different types, I've manually constructed a raw body with JS in other cases to get a format the API expects. It sounds like your API is looking for a multipart content type, and then the underlying chunks (separated by an arbitrary boundary you specify) are other content types.

Not the exact same but might get you started, here's an example of an API I was working with that was multipart and accepts a json object and a file in two different parts of the body. I just formatted it for readability using JS templating, and passed in values from components with the ${} syntax. Sounded like yours could use form-data instead of related like mine given your past attempts.


-Justin

1 Like