trouble setting custom headers
I am trying to set an "AUTH-KEY" into my HTTP Header for a GET request to our Postal Services API. I am receiving a 403-forbidden error, which suggests a problem with the key being read.(the same key works using PHP Curl, so its ok).
Is it possible to set a custom header (with the AUTH-KEY) AND use jsonp???
- $().ready(function() {
$.ajax({
type: "GET",
url:"https://auspost.com.au/api/postage/parcel/domestic/calculate.json?",
headers: {
"AUTH-KEY":"xxxxxxxxxxxxxxxxxxx"
},
dataType:"jsonp",
data:{
"from_postcode":"2470",
"to_postcode":"2000",
"length":"53",
"width":"31",
"height":"25",
"weight":"11.88",
"service_code":"AUS_PARCEL_REGULAR"
}
});
});