I have used the following script for accessing my basecamp project details but still it returns the following Error:
XMLHttpRequest cannot load https://********.basecamphq.com/projects.xml. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://******.****.com' is therefore not allowed access. The response had HTTP status code 405.
$.ajax({
type: 'GET',
url: 'https://xxxxxxxxx.basecamphq.com/projects.xml',
dataType: 'json',
headers: {
"Access-Control-Allow-Origin": "*",
"Authorization":"Basic *********************",
"Accept":"application/json",
"Content-Type": "application/json",
"charset":"=utf-8"
},
error: function (request, textStatus, errorThrown) {
alert('e');
},
success: function () {alert('s');}
});
So may i know is it possible to access the basecamp projects using javascript ajax call if so please add some sample code.