Skip to content

Commit

Permalink
0.6.1-beta.0 httpntlm
Browse files Browse the repository at this point in the history
  • Loading branch information
lula committed Jan 21, 2019
1 parent 1d2802f commit 4bcb279
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion projects/ngx-soap/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
26 changes: 13 additions & 13 deletions projects/ngx-soap/src/lib/soap/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4bcb279

Please sign in to comment.