Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponty96/1ab50c868f5c08af5385f54e0d4bbe8c to your computer and use it in GitHub Desktop.
Save ponty96/1ab50c868f5c08af5385f54e0d4bbe8c to your computer and use it in GitHub Desktop.
Convert multipart mixed to finch command
curl -v --location --request POST "https://route.example.com/route/v2/send" --header 'Content-Type: multipart/mixed; boundary=mimeboundary' --header 'Authorization: Basic AUTH_TOKEN' --data-binary "@body_data.txt"
body_data.txt is:
--mimeboundary
Content-Type: application/json
Content-Id: main
{
"type": "DUDE",
"source": "jane@doe.com",
"destination": "john@doe.com",
"config": "configvalue",
"subject": "Example Email",
"operatordId": 200 }
--mimeboundary
Content-Type: application/vnd.example.remoteContent
Content-Id: EMAIL-Demo.mp4
https://example.com/resources/EMAIL-DEMO.mp4
--mimeboundary
Content-Type: text/plain; charset=utf-8
Content-Id: example.txt
This is my text.
--mimeboundary--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment