diff --git a/README.md b/README.md index 76d4b11..d56b471 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ Install with [npm](http://github.com/isaacs/npm): , Http = ws.Http , Security = ws.Security , UsernameToken = ws.UsernameToken - + + var authToken = new Buffer(user + ':' + pass).toString('base64'); + var request = '' + '
' + '' + @@ -37,6 +39,7 @@ Install with [npm](http://github.com/isaacs/npm): , url: "http://service/security" , action: "http://tempuri.org/EchoString" , contentType: "text/xml" + , authorization: "Basic: "+authToken } @@ -337,7 +340,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ### More details * [http://webservices20.blogspot.com/](http://webservices20.blogspot.com/) * Or drop me an [email](mailto:yaronn01@gmail.com) - - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/yaronn/ws.js/trend.png)](https://bitdeli.com/free "Bitdeli Badge") - + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/yaronn/ws.js/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + diff --git a/lib/handlers/client/http.js b/lib/handlers/client/http.js index 13f490b..279be38 100644 --- a/lib/handlers/client/http.js +++ b/lib/handlers/client/http.js @@ -11,6 +11,7 @@ HttpClientHandler.prototype.send = function(ctx, callback) { , headers: { "SOAPAction": ctx.action , "Content-Type": ctx.contentType , "MIME-Version": "1.0" + , "Authorization": ctx.authorization } , encoding: null , rejectUnauthorized: false @@ -28,4 +29,4 @@ HttpClientHandler.prototype.send = function(ctx, callback) { else ctx.statusCode = response.statusCode callback(ctx) }) -} \ No newline at end of file +}