Right now, I'm trying to do a post request:
https://aleapisoap.azure-api.net/httpbin/listSearchFields
And I need a body which is this:
{
"listSearchFields": {
"email": "sample"
}
}
I tried this in postman and works but with this code in JavaScript doesn't work.
$.ajax({
url: 'https://aleapisoap.azure-api.net/httpbin/listSearchFields',
headers: {
'Content-Type':'application/json',
'Cache-Control':'no-cache',
'Ocp-Apim-Trace':'true',
'Ocp-Apim-Subscription-Key':'19f2a7fd474840bfb5fc729cd97b7335'
},
type: 'POST',
dataType: 'jsonp',
data: '{"listSearchFields":{"email":"sample"}}',
success: function(data){
console.log('succes: '+data);
}
});
This is the error:
net::ERR_ABORTED 404 (Resource Not Found)