
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
node-webservice
Advanced tools
Webservice helper for api requests
Install via npm:
$ npm install node-webservice
const Webservice = require('node-webservice').SOAP;
const webservice = new Webservice(options<Object>);
webservice.execute(Service<Class>, params<Object>) => Promise;
options
object will be pass as argument for Service
constructor
Service
: see below for explainationparams
: object will be pass as argument for Service
method buildRequest
(require service
key containing client path in soap object)const Webservice = require('node-webservice').HTTP;
const webservice = new Webservice(options<Object>);
webservice.execute(Service<Class>, params<Object>) => Promise;
options
object will be pass as argument for Service
constructor
Service
: see below for explainationparams
: object will be pass as argument for Service
method buildRequest
First argument for webservice execute
function
class MyService {
/**
* Initialize the operation
*
* @param {Object} options
*/
constructor(options) {
// do your stuff
}
/**
* Build the JSON request
*
* @param {Object} params Request query params
* @return {Promise/undefined}
*/
buildRequest(params) {
// do your stuff
}
/**
* Get the JSON request
*
* @return {Object} JSON request
*/
getRequest() {
// do your stuff
}
/**
* Parse webservice response
*
* @param {String} response XML or JSON response from the webservice
* @param {Object} headers headers Object response from the webservice (Only present for HTTP request)
* @return {???} your parse response
*/
getResponse(response, headers) {
// do your stuff
}
/**
* Parse webservice error
*
* @param {Object} error
* @return {???} your parse error
*/
getError(error) {
// do your stuff
}
/**
* Return service URL
*
* @return {String} URL
*/
getURL() {
return 'https://google.com';
}
}
See examples
This project is a work in progress and subject to API changes, please feel free to contribute
FAQs
Webservice helper for api requests
The npm package node-webservice receives a total of 1 weekly downloads. As such, node-webservice popularity was classified as not popular.
We found that node-webservice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.