Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
easy-soap-request
Advanced tools
A small library to make SOAP requests easier via Node.js, Deno, and your browser
npm install easy-soap-request
const soapRequest = require('easy-soap-request');
const fs = require('fs');
// example data
const url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php';
const sampleHeaders = {
'user-agent': 'sampleTest',
'Content-Type': 'text/xml;charset=UTF-8',
'soapAction': 'https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode',
};
const xml = fs.readFileSync('test/zip-code-envelope.xml', 'utf-8');
// usage of module
(async () => {
const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml, timeout: 1000 }); // Optional timeout parameter(milliseconds)
const { headers, body, statusCode } = response;
console.log(headers);
console.log(body);
console.log(statusCode);
})();
import soapRequest from 'https://deno.land/x/easy_soap_request/index.d.js';
// example data
const url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php';
const sampleHeaders = {
'user-agent': 'sampleTest',
'Content-Type': 'text/xml;charset=UTF-8',
'soapAction': 'https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode',
};
// usage of module
(async () => {
const xml = await Deno.readFile('test/zip-code-envelope.xml');
const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml });
const { headers, body, statusCode } = response;
console.log(headers);
console.log(body);
console.log(statusCode);
})();
Note: CORS policies apply
<html>
<script src="https://cdn.jsdelivr.net/npm/easy-soap-request/dist/easy-soap-request.js"></script>
<script>
const url = 'https://my-soap-server';
const sampleHeaders = {
'Content-Type': 'text/xml;charset=UTF-8',
SOAPAction: 'https://my-soap-action/something',
};
const xml = `<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>Some Data</soapenv:Body>
</soapenv:Envelope>`;
async function makeRequest() {
const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml, timeout: 1000 });
const { headers, body, statusCode } = response;
console.log(headers);
console.log(body);
console.log(statusCode);
document.body.innerHTML = body;
};
makeRequest();
</script>
<body></body>
</html>
5.1.0(2022-10-08)
FAQs
A small library to make SOAP requests easier
The npm package easy-soap-request receives a total of 14,492 weekly downloads. As such, easy-soap-request popularity was classified as popular.
We found that easy-soap-request demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.