Skip to content

Conversation

@lekoaf
Copy link

@lekoaf lekoaf commented Sep 8, 2016

Hi!

I tried to rewrite this with Promises and ES6. You should probably check it out and try it before accepting the pull request since the example didn't really work. It does go in to the catch statement atleast with:

{ 
  Error: connect EHOSTUNREACH 93.184.220.20:80
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
  code: 'EHOSTUNREACH',
  errno: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '93.184.220.20',
  port: 80 
}

I also bumped the version to 1.0.0 since these are breaking changes.
(Found this repo while looking for soap-clients for a project of mine)

@jtblin
Copy link
Member

jtblin commented Sep 24, 2016

Thanks for the PR @lekoaf. Out of curiosity, why not just using something like promisify?

I'd be happy to accept the PR with a breaking change as long as the example and tests still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants