nodejs XHR alternative for http request

I need to use an API for an application I am builiding but the API doesn't allow for CORS, how else can I make GET and POST requests to the website without using XHR. I've been looking at websockets and socket.io but it doesn't seem like I can make http requests with them.

My other solution is creating using PHP or curl to make the requests but I feel like that isn't a good a idea.

Edit: More info

The API I want to use is https://bitcoinindex.es/api

I want to grab the exchange prices that are listed and list them from greatest to least.

I was using AngularJS to make the first API request here is my code

  $http.get("https://bitcoinindex.es/api/v0.1/coinbase/usd/btc/last").success (JSON) 

If you want to do some request from server side using nodejs some module like Request could help you.

As a PHP developer moving from a traditional LAMP stack to angularJS and nodejs there were a few assumptions I made that were wrong.

All Http request are the same

Now of course I knew that there was GET, POST, and PUT but I thought a get request was the same across the board, this is not true. There are traditional request made from the backend of an application from a server using libraries such as curl. These http request are made before a webpage loads.

With AngularJS request are made from the front-end, meaning after the webpage is loaded the request is made. This is called XHR and is supported by all modern browsers, the thing with XHR is that it can leave user data vulnerable so it only works if the request is made to a location on the same server. If you're making a request to a different server then CORS needs to be enabled by the server response is coming from and can be configured through the access-control-allow-origin header.

NodeJS is some type of front-end hippy code

Again coming from PHP I didn't understand that nodeJS is an actual server just like an apache server, and can make the traditional request mentioned in the first section.

Making request

Making nodeJS request is very simple with the nodejs request library.

var request = require('request');
request('http://www.google.com', function (error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log(body) // Print the google web page.
  }
})

Creator of bitcoindex.es here. We use NodeJS and the Request library as mentioned in the other posts. If you have any questions, feel free to email me at tim@tjc.io. Cheers!