diff --git a/projects/ngx-soap/package.json b/projects/ngx-soap/package.json index 105ebf2..ab97cd2 100644 --- a/projects/ngx-soap/package.json +++ b/projects/ngx-soap/package.json @@ -1,6 +1,6 @@ { "name": "ngx-soap", - "version": "0.6.0", + "version": "0.6.1-beta.0", "description": "SOAP service for Angular", "homepage": "https://github.com/lula/ngx-soap", "author": "Luca Lulani", diff --git a/projects/ngx-soap/src/lib/soap/http.ts b/projects/ngx-soap/src/lib/soap/http.ts index f15fdb8..75d4abd 100644 --- a/projects/ngx-soap/src/lib/soap/http.ts +++ b/projects/ngx-soap/src/lib/soap/http.ts @@ -5,7 +5,7 @@ import * as url from 'url'; const req = null; // require('request'); -// import * as httpNtlm from 'httpntlm'; +import * as httpNtlm from 'httpntlm'; import { Buffer } from 'buffer'; const VERSION = '0.0.0'; //require('../package.json').version; @@ -113,18 +113,18 @@ HttpClient.prototype.request = function(rurl, data, callback, exheaders, exoptio // // sadly when using ntlm nothing to return // // Not sure if this can be handled in a cleaner way rather than an if/else, // // will to tidy up if I get chance later, patches welcome - insanityinside - // options.url = rurl; - // httpNtlm[options.method.toLowerCase()](options, function (err, res) { - // if (err) { - // return callback(err); - // } - // // if result is stream - // if( typeof res.body !== 'string') { - // res.body = res.body.toString(); - // } - // res.body = self.handleResponse(req, res, res.body); - // callback(null, res, res.body); - // }); + options.url = rurl; + httpNtlm[options.method.toLowerCase()](options, function (err, res) { + if (err) { + return callback(err); + } + // if result is stream + if( typeof res.body !== 'string') { + res.body = res.body.toString(); + } + res.body = self.handleResponse(req, res, res.body); + callback(null, res, res.body); + }); } else { req = self._request(options, function (err, res, body) { if (err) {