Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
circa10a committed Jul 11, 2018
1 parent 141dcc0 commit 14b2654
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,7 @@ npm install easy-soap-request

## Usage

```javascript
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);
})();
```
![](https://i.imgur.com/NF6ibD6.png)

## Tests

Expand Down

0 comments on commit 14b2654

Please sign in to comment.