AnsweredAssumed Answered

FileMaker and MailChimp - using PUT, GET, DELETE

Question asked by orbitpro on Apr 13, 2018
Latest reply on Apr 17, 2018 by orbitpro

(I am using FM16 to access a data file hosted on FM16 Server - all Mac environment)


I have been able to connect FM and MailChimp (MC) together via their API.  So far I can successfully add a new member to MC and return JSON data.


What I also want to do is update MC member information, check on subscription status, delete members or unsubscribe members from within my FM solution.  To do this it appears that I need PUT, GET and DELETE requests to pass through to MC.


I know that the Base Elements plugin (amongst others) will do this but was researching to see if I can do this natively in FM.


I found some info on the MC support pages that indicate I can use a 'header override'  but I can't seem to get this working.  The comment from the MC support page is (there is a link to more detail re this method):



If your ISP doesn’t permit HTTP operations other than GET or POST, use HTTP Method tunneling: make your call with POST, but include the method you intend to use in an X-HTTP-Method-Override header.


I added a cURL option: "--header X-HTTP-Method-Override:PUT" but the JSON data that returns tells me that I am still passing a POST request.  I've changed the order of the cURL options in my script which seems to make some differences but hasn't helped me solve this problem.

Note, that I am also struggling to make a GET request work as the JSON data tells me that I am sending a POST request.

Can anyone help me with the commands to pass the relevant HTTP request (ie. PUT, GET, DELETE) natively from FM to MC?

Thank you.