Skip to content

Commit

Permalink
Merge 09484ed into 92ab59b
Browse files Browse the repository at this point in the history
  • Loading branch information
circa10a committed Oct 4, 2018
2 parents 92ab59b + 09484ed commit d7478fe
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,27 @@ npm install easy-soap-request

## Usage

![](https://i.imgur.com/NF6ibD6.png)
```js
const soapRequest = require('easy-soap-request');
const fs = require('fs');

// example data
const url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php';
const headers = {
'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/zipCodeEnvelope.xml', 'utf-8');

// usage of module
(async () => {
const { response } = await soapRequest(url, headers, xml);
const { body, statusCode } = response;
console.log(body);
console.log(statusCode);
})();
```

## Tests

Expand Down

0 comments on commit d7478fe

Please sign in to comment.