# easy-soap-request

> A small library to make SOAP requests easier

Latest version **5.23.0** (published 2026-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-soap-request
pnpm add easy-soap-request
yarn add easy-soap-request
bun add easy-soap-request
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.23.0 |
| Published | 2026-11-09 |
| First published | 2018-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 203.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 167 |
| Author | Caleb Lemoine |
| Maintainers | circa10a |
| Keywords | soap, http, axios, xml, wsdl |

## Links

- npm: https://www.npmjs.com/package/easy-soap-request
- Repository: https://github.com/circa10a/easy-soap-request
- Homepage: https://github.com/circa10a/easy-soap-request#readme
- Issues: https://github.com/circa10a/easy-soap-request/issues
- npm.io page: https://npm.io/package/easy-soap-request

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.21.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 5.23.0 (latest) — 2026-11-09
- 5.22.0 — 2026-11-02
- 5.21.0 — 2026-08-31
- 5.20.0 — 2026-08-03
- 5.19.0 — 2026-06-29
- 5.18.0 — 2026-06-15
- 5.17.0 — 2026-06-08
- 5.16.0 — 2026-05-18
- 5.15.0 — 2026-05-04
- 5.14.0 — 2026-04-27
- 5.13.0 — 2026-04-20
- 5.12.0 — 2026-04-13
- 5.11.0 — 2026-03-30
- 5.10.0 — 2026-03-04
- 5.9.0 — 2026-02-20
- … 75 more at https://npm.io/package/easy-soap-request/versions

## README

# easy-soap-request

[![Build Status](https://github.com/circa10a/easy-soap-request/workflows/release/badge.svg)](https://github.com/circa10a/easy-soap-request/actions)
[![npm version](https://img.shields.io/npm/v/easy-soap-request.svg?style=flat-square)](https://www.npmjs.com/package/easy-soap-request)
[![npm downloads](https://img.shields.io/npm/dm/easy-soap-request.svg?style=flat-square)](https://npm-stat.com/charts.html?package=easy-soap-request&from=2018-03-29)
[![Buy Me A Coffee](https://img.shields.io/badge/BuyMeACoffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://www.buymeacoffee.com/caleblemoine)
[![NPM](https://nodei.co/npm/easy-soap-request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/easy-soap-request)

A small library to make SOAP requests easier via Node.js, Deno, and your browser

## Installation

```bash
npm install easy-soap-request
```

## Usage

### Node.js

```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 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);
})();
```

### Deno

```js
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
const xml = await Deno.readTextFile('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);
```

### Browser

> Note: CORS policies apply

```html
<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>
```

## Changelog

[Changelog.md](CHANGELOG.md)

## Tests

* [Example](https://github.com/circa10a/easy-soap-request/tree/master/test)

---
_Source: https://npm.io/package/easy-soap-request · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
