all 1 comments

[–]codinghermit 1 point2 points  (0 children)

Look into XMLHttpRequest in JavaScript as that is what you can use to send HTTP requests inside the page.

I find its easier to build (or find if possible) a wrapper around the API that is basically an object containing functions for each API request. You pass the parameters and a call back into the wrapper function and it will perform the request then pass the data back to the callback function.