GET works but POST does not for 'Access-Control-Allow-Origin'
richarddavenport opened this issue · 1 comments
richarddavenport commented
The API I'm calling allows all origins. When I do a GET request it works, but when I do a POST, my browser reports a 'Access-Control-Allow-Origin' not set, but I know that's not the case.
GET:
reqwest({
url: base,
crossOrigin: true,
success: function (trackers) {
callback(trackers)
}
})
POST:
reqwest({
url: base,
method: 'post',
contentType: 'application/json',
data: '"' + title + '"',
crossOrigin: true,
error: function (res) {
console.log(res)
},
success: function (res) {
callback(res)
}
})
richarddavenport commented
API issue, the API didn't allow headers.