xmlrpc-parser

1.0.3 • Public • Published

XML-RPC Parser

npm version npm downloads License

Platform independent XML-RPC parser

Installation

npm install xmlrpc-parser

Example

//
import fetch from 'cross-fetch';
import { XmlRpcMessage, XmlRpcResponse } from 'xmlrpc-parser';
//
const method = 'examples.getStateName';
const params = 23;
const message = new XmlRpcMessage(method, [params]);
const input = message.xml();
const URL = 'http://betty.userland.com/RPC2';
//
const res = await fetch(URL, { method: 'post', body: input });
const xml = await res.text();
//
const response = new XmlRpcResponse();
const result = await response.parse(xml);
//
console.log(result);

License

This project is licensed under the MIT License - see the LICENSE file for details

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    694
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    694
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i xmlrpc-parser

Weekly Downloads

694

Version

1.0.3

License

MIT

Unpacked Size

15.9 kB

Total Files

7

Last publish

Collaborators

  • leoz