I need to do a http request to a mail chimp subscription list via a component post
I've read the mail chimp documentation and couldnt find anything on this. I also tried their mail chimp embedded form in an angular 2 html5 view but that doesnt work for some weird reason.
So I've resulted to doing a http request to the subscribe list instead and I'm having trouble getting that working.
I'm using typescript, angular2 and mail chimp
This is my code so far:
subscribe = () => {
var url = "https://mysubscriptionlist.us10.list-manage.com/subscribe/post?u=b0c935d6f51c1f7aaf1edd8ff&id=9d740459d3&subscribe=Subscribe&EMAIL=" + this.email;
this.jsonp.request(url).subscribe(response => {
console.log(response);
});
}
This is my current console log error in chrome:
Uncaught SyntaxError: Unexpected token <
url
in new tab. – Haruspicy