Writing a GET request using node and request module
<p>Using NODE, I'm using the request module to GET request to a site I've already auth'd to. They passed me a sessionID so I can make REST calls and interact with the data.</p>

<p>I'm struggling to make GET request and pass the cookies correctly. I continue to get a STATUS: 500 even though I know the site works correctly. Its somewhere in how I'm passing the cookie I think.</p>

<p>MY CODE</p>

<hr>

<pre><code>var sessionID = "49CD32C2BD250FF3C5078FB977936350";
var request = require('request');

param = {
    "header": {
        "Accept": "application/json"
    ,   "Cookie": "customer=CHEESEHEAD;JSESSIONID="+ sessionID
    }
}

request.get('https://cheesehead.autodeskplm360.net/api/rest/v1/workspaces', {form: param}, function(err, response){

    if(err){
       console.log(err);
    } else if (response.statusCode == 500) {

    console.log('Response Status Code: ' + response.statusCode + ' Internal Error')     
    } else {
    console.log('Status Code: ' + response.statusCode)

    console.log(response.body)
  }
});
</code></pre>