I need to test an endpoint accepting multipart/form-data. The endpoint expects a required part with content id "messageToSend" and optional parts with content id's "document[1-x]". The documents are to be file attachments and I want to send the "messageToSend" as a JSON payload.
The attachments are working without issue, but using the query parameter value to input my JSON is not great UX. Ideally I would be able to refer to the body below from the query param so the content id is set correctly. You can imagine if the JSON content were much larger it would be painful to use the query parameter as the text box.
As you can see in the screenshots above, the JSON payload has the correct Content-Type but no Content-Disposition. Functionally the two parts need to be merged. I either need to be able to:
- Refer to the JSON from the query parameter where placeholder "REFER_TO_JSON_BODY" (similar to file:fileName).
- Set the "content id" in the large text box with the rest of the JSON.
Kind regards