{"id":15567558,"url":"https://github.com/circa10a/easy-soap-request","last_synced_at":"2025-04-04T10:04:17.592Z","repository":{"id":39613481,"uuid":"127355335","full_name":"circa10a/easy-soap-request","owner":"circa10a","description":"Small Node.js library to make SOAP requests easier","archived":false,"fork":false,"pushed_at":"2024-01-31T04:19:42.000Z","size":1265,"stargazers_count":164,"open_issues_count":1,"forks_count":45,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-30T20:01:42.670Z","etag":null,"topics":["deno","hacktoberfest","http-requests","nodejs","npm-module","soap"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circa10a.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-29T22:51:10.000Z","updated_at":"2025-03-19T13:02:44.000Z","dependencies_parsed_at":"2024-06-18T13:43:42.316Z","dependency_job_id":null,"html_url":"https://github.com/circa10a/easy-soap-request","commit_stats":{"total_commits":128,"total_committers":13,"mean_commits":9.846153846153847,"dds":0.671875,"last_synced_commit":"2b4eeb31c1c95ad03abb88e9e0183fea8d95cb6b"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Feasy-soap-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Feasy-soap-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Feasy-soap-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Feasy-soap-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circa10a","download_url":"https://codeload.github.com/circa10a/easy-soap-request/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247150349,"owners_count":20892122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","hacktoberfest","http-requests","nodejs","npm-module","soap"],"created_at":"2024-10-02T17:11:43.613Z","updated_at":"2025-04-04T10:04:17.566Z","avatar_url":"https://github.com/circa10a.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/caleblemoine"],"categories":[],"sub_categories":[],"readme":"# easy-soap-request\n\n[![Build Status](https://github.com/circa10a/easy-soap-request/workflows/release/badge.svg)](https://github.com/circa10a/easy-soap-request/actions)\n[![npm version](https://img.shields.io/npm/v/easy-soap-request.svg?style=flat-square)](https://www.npmjs.com/package/easy-soap-request)\n[![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\u0026from=2018-03-29)\n[![Buy Me A Coffee](https://img.shields.io/badge/BuyMeACoffee-Donate-ff813f.svg?logo=CoffeeScript\u0026style=flat-square)](https://www.buymeacoffee.com/caleblemoine)\n[![NPM](https://nodei.co/npm/easy-soap-request.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/easy-soap-request)\n\nA small library to make SOAP requests easier via Node.js, Deno, and your browser\n\n## Installation\n\n```bash\nnpm install easy-soap-request\n```\n\n## Usage\n\n### Node.js\n\n```js\nconst soapRequest = require('easy-soap-request');\nconst fs = require('fs');\n\n// example data\nconst url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php';\nconst sampleHeaders = {\n  'user-agent': 'sampleTest',\n  'Content-Type': 'text/xml;charset=UTF-8',\n  'soapAction': 'https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode',\n};\nconst xml = fs.readFileSync('test/zip-code-envelope.xml', 'utf-8');\n\n// usage of module\n(async () =\u003e {\n  const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml, timeout: 1000 }); // Optional timeout parameter(milliseconds)\n  const { headers, body, statusCode } = response;\n  console.log(headers);\n  console.log(body);\n  console.log(statusCode);\n})();\n```\n\n### Deno\n\n```js\nimport soapRequest from 'https://deno.land/x/easy_soap_request/index.d.js';\n\n// example data\nconst url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php';\nconst sampleHeaders = {\n  'user-agent': 'sampleTest',\n  'Content-Type': 'text/xml;charset=UTF-8',\n  'soapAction': 'https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode',\n};\n\n// usage of module\n(async () =\u003e {\n  const xml = await Deno.readFile('test/zip-code-envelope.xml');\n  const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml });\n  const { headers, body, statusCode } = response;\n  console.log(headers);\n  console.log(body);\n  console.log(statusCode);\n})();\n```\n\n### Browser\n\n\u003e Note: CORS policies apply\n\n```html\n\u003chtml\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/easy-soap-request/dist/easy-soap-request.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    const url = 'https://my-soap-server';\n    const sampleHeaders = {\n        'Content-Type': 'text/xml;charset=UTF-8',\n        SOAPAction: 'https://my-soap-action/something',\n    };\n    const xml = `\u003csoapenv: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/\"\u003e\n                 \u003csoapenv:Header/\u003e\n                 \u003csoapenv:Body\u003eSome Data\u003c/soapenv:Body\u003e\n                 \u003c/soapenv:Envelope\u003e`;\n    async function makeRequest() {\n        const { response } = await soapRequest({ url: url, headers: sampleHeaders, xml: xml, timeout: 1000 });\n        const { headers, body, statusCode } = response;\n        console.log(headers);\n        console.log(body);\n        console.log(statusCode);\n        document.body.innerHTML = body;\n    };\n    makeRequest();\n\u003c/script\u003e\n\u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Changelog\n\n[Changelog.md](CHANGELOG.md)\n\n## Tests\n\n* [Example](https://github.com/circa10a/easy-soap-request/tree/master/test)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirca10a%2Feasy-soap-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirca10a%2Feasy-soap-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirca10a%2Feasy-soap-request/lists"}