replaced the deprecated method http.createClient for http.request
Merge pull request #2 from oscarvgg/master

Updated deprecated method