I need to make a get request to this url:
http://action.metaffiliation.com/trk.php?mclic=N4CD1F1015&argann=test
when I do it via curl
curl 'http://action.metaffiliation.com/trk.php?mclic=N4CD1F1015&argann=test'
everything works fine, I do get the GIF object I'm expecting.
When I run this get request using $http.get
using AngularJS, it first runs an OPTIONS request that fails.
I've checked MDN HTTP access control (CORS) and have added what I think are the correct headers to make a simple request:
$http.get('http://action.metaffiliation.com/trk.php?mclic=N4CD1F1015&argann=test', {
headers: {'Accept': 'image/webp,image/*,*/*;q=0.8',
'Content-Type': 'text/plain',
'Cache-Control': 'no-cache'}
});
Still no luck.
any idea ?
P.S: the url that I'm hitting is supposed to be called in a img
tag
thanks