0
$.ajax({
  url  : 'http://prcweb.co.uk/lab/what-makes-us-happy/data/summary.csv',
  type : 'get',
  }).done(function(data, statusText, xhr){
  var status = xhr.status;                //200
  var head = xhr.getAllResponseHeaders(); //Detail header info
   alert(data);
})

can anybody explain me why this api call not returning the data i want. is there any mistake i am doing? I have tried with plain get request too. What am doing wrong?

divakar
  • 1,379
  • 6
  • 15
  • 31
  • look at your browser console.. you should see something like `XMLHttpRequest cannot load http://prcweb.co.uk/lab/what-makes-us-happy/data/summary.csv. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://fiddle.jshell.net' is therefore not allowed access. ` – Arun P Johny Sep 18 '14 at 07:38

1 Answers1

0

I'm seeing this:

XMLHttpRequest cannot load http://prcweb.co.uk/lab/what-makes-us-happy/data/summary.csv?_=1411025854415. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin http://stackoverflow.com' is therefore not allowed access.

So it seems that CORS is not allowing you to get the data.

jpou
  • 1,935
  • 2
  • 21
  • 30