Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

handsoap

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handsoap - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

8

handsoap.js

@@ -41,3 +41,3 @@ const request = require('request');

envelope(operation, body, options) {
var xml = '<?xml version="1.0" encoding="UTF-8"?>';
let xml = '<?xml version="1.0" encoding="UTF-8"?>';
xml += '<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +

@@ -79,4 +79,4 @@ 'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" ' + this.namespaces(options.namespaces) + '>';

namespaces(ns) {
var attributes = '';
for (var name in ns) {
let attributes = '';
for (let name in ns) {
attributes += name + '="' + ns[name] + '" ';

@@ -92,3 +92,3 @@ }

gunzip(callback) {
var gunzip = zlib.createGunzip();
let gunzip = zlib.createGunzip();
gunzip.on('error', callback);

@@ -95,0 +95,0 @@ return gunzip;

{
"name": "handsoap",
"version": "0.0.3",
"version": "0.0.4",
"description": "A (really) simple soap client",

@@ -5,0 +5,0 @@ "main": "handsoap.js",

# handsoap
## Basic Usage
```javascript

@@ -7,4 +9,2 @@ const handsoap = require('handsoap');

const url = 'MY URL';
const operation = 'MyOper';
const action = 'MyAction';
const body = {

@@ -23,3 +23,6 @@ some: {

},
namespace: 'MyNamespace'
namespaces: [
'MyNameSpace': 'My.Name.Space',
'MyNameSpace2': 'My.Name.Space.2'
]
}

@@ -34,1 +37,35 @@

```
## Wrapper Example
```javascript
// definition
const handsoap = require('handsoap');
HandSoapWrapper = function(url, options, auth) {
this.url = url;
this.options = options;
this.auth = auth;
};
HandSoapWrapper.prototype._wrapRequest = function(operation, action, body) {
return handsoap(this.url, operation, action, body, this.options, this.auth);
}
HandSoapWrapper.prototype.myOperation = function(body) {
const operation = 'MyOper';
const action = 'MyAction';
return this._wrapRequest(operation, action, body);
}
// usage
const handSoapWrapper = new HandSoapWrapper()
handSoapWrapper.myOperation(body).then((response) => {
// Success
}, (err) => {
// Error
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc