Skip to content

Instantly share code, notes, and snippets.

@CiscoKidxx
Last active April 14, 2017 19:55
Show Gist options
  • Save CiscoKidxx/83be168687b5ac6ebdb5fba2517b1021 to your computer and use it in GitHub Desktop.
Save CiscoKidxx/83be168687b5ac6ebdb5fba2517b1021 to your computer and use it in GitHub Desktop.
const soap = require('soap'),
request = require('request');
const url = 'https://fakeapi.com/stats?wsdl';
let request_with_defaults = request.defaults({'auth': {'user': 'fakeuser', 'pass': 'fakepass', 'sendImmediately': true}});
let soap_client_options = {'request': request_with_defaults};
soap.createClient(url, soap_client_options, function(err, client) {
if (err) {
console.log(err);
}
if (client) {
client.getMyPermissions(function(err, result) {
console.log(result.body);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment