http.createClient changed to http.Request

- Updated the depreciated http.createClient to http.Request as existing
code doesnt work out of the box on new node.js version

- also the current version throws exception at request.close() API.
Changed it to request.end() works now.