I am wondering if anyone knows how to nest a multipart/form-data call using the API Connector (or any other means within Bubble for that matter). Below is the call I am trying to perform:
curl -X POST
https://your_domain/posts
-H ‘cache-control: no-cache’
-H ‘content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW’
-F api_key=your_key
-F api_username=your_user
-F ‘title=We’’‘ll have a whale of a time ’
-F ‘raw=Put on the beach boys and surf the day away.’
-F category=Events
-F ‘location={“geo_location”: {“lat”: “-3.1667533”,“lon”: “-161.2040476”,“address”: “Middle of the Pacific Ocean”},“name”: “The Middle of Nowhere”}’
-F ‘event={ “start”: “2017-10-18T10:08:08Z”, “end”: “2017-10-18T11:08:08Z” }’
As you will notice above, the call wants a nested json for “location”. I cannot figure out how to do that in the API connector since the “Form-Data” body type does not seem to lend itself to nested json (unless you all know something I don’t know).
I can create a nested application/json call, no problem, but the type of call required in this case seems to be multipart/form-data (form data body type) for some reason. Any help is appreciated.