REST POST csv data or string - multipart/form-data PATCH

0
Similar to this forum request https://community.mendix.com/link/questions/98052 I am trying to perform a multi-part form data submission to a rest api endpoint (PATCH) . I have this working in Postman where it sends a CSV file as a string but cannot replicate in Mendix. My data is accessible as an entity list but is not yet stored as a system.FileDocument  Initially I have tested as a hardcoded string but without success. Can anyone suggest a solution to send a list as a string of data or how to create the system.FileDocument and send that as the payload? Here are the steps that work in Postman which returns a dataset version id: Headers Content-Type – multipart/form-data; boundary=Boundary (this can’t be used in Mendix as it forces the content-type to multipart, however I cannot add the Boundary identifier) Content-Disposition – form-data; name="file"; filename="Development" Content-Type "text/csv"   Body Configuration – ‘{}’ File – this is a string e.g.  ‘Timestamp,Phosphate,Ammonium,ElectricalConductivity,OxidationReductionPotential,PH,Temperature,Turbidity 2022-04-04 13:35:33,0,1.16,228,383,6.62,10.175,0.149 2022-04-04 14:36:05,0,1.15,228,383.5,6.62,10.35,0.156 2022-04-04 15:35:38,0,1.14,228,383.3,6.59,10.5,0.266 2022-04-04 16:35:09,0,1.13,227,384.4,6.58,10.55,0.188’   I have also successfully run the PATCH statement through Node-Red and this has the following string as the payload body – this didn’t work in Mendix… --Boundary Content-Disposition: form-data; name="configuration" Content-Type: "application/json" {} --Boundary Content-Disposition: form-data; name="file"; filename="Development" Content-Type: "text/csv" Timestamp,Phosphate,Ammonium,ElectricalConductivity,OxidationReductionPotential,PH,Temperature,Turbidity 2022-05-16 04:54:30,0,0.23,264,418.5,3.16,16.625,0.339 2022-05-16 05:53:59,0,0.23,262,419.5,3.23,16.6,0.411 2022-05-16 06:54:25,0,0.23,262,418.4,3.19,16.55,0.382 2022-05-16 07:53:49,0,0.23,262,418.1,3.21,16.65,0.392 --Boundary--   Any help gratefully received. Here are the parameters I have used in Mendix:  
asked
0 answers