jQuery ajax (POST) request and circumventing 'Same-origin policy'.

jQuery ajax (POST) request and circumventing 'Same-origin policy'.

Hello!

I am relatively new to jquery and have a very basic understanding of javascript after having recently begun using codecademy to start learning. I have a good understanding of HTML/CSS and a little PHP, and many moons ago studied Pascal in college which I was quite good at, but would now like to venture further into the coding world.

I have been set the below challenge but after having researched possible solutions for the best part of today, I am reaching out for some guidence because I am a little confused as to what solution would be best and I have been set a deadline to complete the challenge.

The challenge
This task includes designing and implementing an image slider that possesses the following main functions:

Make a jQuery ajax (POST) request to retrieve image URLs from an API using a technique to circumvent the browser's 'Same-origin policy'.

You are not allowed to use any other libraries or frameworks except the provided jQuery version 2.0.3 and the task doesn't include to setup a server to serve html/js files.





Based on the details of the challenge it is unclear whether or not I can use window.postMessage or CORS as it does not state the browser type or HTML version to use, presumably I can use current releases outside of beta testing, although I am still unsure if those techniques are suitable.

JSONP I am unsure of as from reading up on it it seems that the data being retrieved has to be in JSONP JSON format and I an unsure what format type the data is in. I have seen php used to act as a proxy, but I am unsure if I am allowed to use PHP; ajax I remember being an option but I believe I remember reading there being issues with this method too.

I have tried tutorials, wikipedias, yourtube, forums, google, and I am quite lost; I can assign functions to buttons and set variables in jquery but anything beyond that is all new ground so any guidance would be highly appreciated.

Thank you for your time!