http.request() method not working with urls having subdomains

I am trying to post some data like this

var options={hostname:'www.sub.domain.com',path:'post.php?'+qs.stringify(postData), method:'GET '};

and then calling this object with http.request(). It throws this error

   events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: Parse Error
    at Socket.socketOnData (http.js:1485:20)
    at TCP.onread (net.js:404:27)

What may be the issue?

Use host instead hostname in "option" object. Try as follows,

var options = {
    host : 'www.sub.domain.com',
    path:'/post.php?'+qs.stringify(postData),
    method : 'GET'
  };