I have the following code that I use to send data to the MailChimp mailing list (API v3). Every time I remove type: POST from the function that it is trying to send data via GET, and it sends the data correctly (ok response in the MailChimp API control panel). When testing this in a browser (FF), I get a .part file with a "true" answer.
$(function(){ $("a#test").click(function(e){ e.preventDefault() data = { "apikey" : "667378947", "id" : "90298590285", "email_address" : "test@getmoxied.net", "output" : "json" } $.ajax({ type: "POST", url: 'http://us2.api.mailchimp.com/1.3/?method=listSubscribe', data: data, success: function(data){ alert(data); }, error: function(){ alert("err"); } }) }); });
I pull my hair out on this, any insight is much appreciated.
Thanks in advance,
Jn
json javascript jquery ajax mailchimp
jeffreynolte Mar 04 2018-11-11T00: 00Z
source share