A server is looking for CORS requests to get data sets, but the issue is that i dont know how to create a proper CORS request using $.ajax.
There is 1 Stackoverflow post which helps describe it: How to get a cross-origin resource sharing (CORS) post request working
There is a Wikipedia Article on it: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
But all in all, despite it telling me that information, i have issues understanding how to properly do the request.
In the first link, it just does a
$.post(SERVER_URL, {file_url:"asfd"}, function(e){console.log(e);});
I think my confusion is that i was thinking that i would need to do 2 requests. One which does the initial hand-shaking, and then the other which takes the result of the first plus some other data.
Could someone help me create a proper CORS requet using jQuery OR Javascript? It seems like i dont quite understand how the structure of it is. If there are certain flags i need to use. I am used to doing simple JSONP requests, which since it is not CORS get the data, but then fail.
Thank you.
EDIT I have a post which is related that was resolved. The Result was JSON, not JSONP, but the server department said CORS was set up on the machines so i figured i did the syntax wrong. Here is the link: AJAX request returns 200OK but fails despite return data being JSON