AnsweredAssumed Answered

Best Way to POST with a COOKIE

Question asked by deninger on Aug 27, 2016
Latest reply on Aug 29, 2016 by deninger

I have to be able to POST to a Restful web service and the curl statement that represents what I need to do is this:


curl -i -X POST -H "Content-Type: application/json" --cookie "iPlanetDirectoryPro=AQI....A3*" -d @/path/to/data.json


I have been able to POST via several different methods in the past, including


1) MBS Plugin

2) Base Elements Plugin

3) custom PHP using CURL


I have also toyed with simply trying to send the command line CURL, but platform differences might make this difficult and I do need the result of the CURL returned to the solution...


My struggle here is attaching the cookie information to the POST. I have tried a all three above without success. I believe that the difficulty stems from the difference between how the command line CURL command handles the cookie (the --cookie "data=value" works fine there) compared to implementations in PHP, MPB Plugin and the Base Elements Plugin.


Would anyone be able to "translate" the above CURL command to a FM Pro usable version using one or more of the available mechanisms? The return result (form the CURL command is important to me and needs to be captures back into the Filemaker solution).