Forum Discussion
Hi, I’m looking to send a request that uses REST Post Multipart Form-Data without the file upload. I’m having issues configuring the REST Post Snap. What should go into the HTTP Entity and how do we ensure it sends it as multipart/form-data rather than application/json.
I’ve resolved the issue with help from another SnapLogic community page. See https://community.snaplogic.com/t/rest-post-with-form-params-in-the-body-of-the-request-giving-error/3128/19.
I changed the Content-Type to expect: application/x-www-form-urlencoded (rather than multipart/form-data) and I serialized the body using the expression: $.entries().map(e => e[0] + “=” + encodeURIComponent(e[1])).join(“&”), which I passed into the HTTP entity field in the REST Post. I can now make a successful request.