Skip to content

Commit

Permalink
fix: http.get returns "getaddrinfo ENOTFOUND" error (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmichalina authored Dec 6, 2019
1 parent d0e0bd3 commit c6182a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ipscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const ipscan =
flatMap(urls => forkJoin(
urls.map(url => http.post(url, {
headers: { 'Content-Type': 'application/soap+xml; charset=utf-8;' },
family: 4, // https://github.com/nodejs/node/issues/5436#issuecomment-189600282
body: '<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope"><Body xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></Body></Envelope>'
}).pipe(
map(res => res.response.statusCode === 200
Expand Down

0 comments on commit c6182a2

Please sign in to comment.