Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sefffal/xml-rpc.js
Library for XML-RPC from JavaScript across domains.
https://github.com/sefffal/xml-rpc.js
Last synced: about 2 months ago
JSON representation
Library for XML-RPC from JavaScript across domains.
- Host: GitHub
- URL: https://github.com/sefffal/xml-rpc.js
- Owner: sefffal
- License: gpl-3.0
- Created: 2015-02-26T19:23:00.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-27T01:03:27.000Z (almost 10 years ago)
- Last Synced: 2024-10-13T18:10:06.259Z (3 months ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xml-rpc.js
Library for XML-RPC from JavaScript across domains.Based on the Mimic JS library oringinally written by Carlos Eduardo Goncalves; see below for license.
Provides an easy to use object-oriented interface for XML-RPC.
Transparently converts objects to JS literals were practical (e.g. String('abc') -> 'abc').
Allows using XML-RPC with servers on different domains and/or ports than the originating web server.## Limitations
At this stage, the library relies on syncronous AJAX calls to allow completely transparent method invocation.
In the future, there will be an option to return a JS Promise object instead of the result, and use asyncronous AJAX instead.## Examples
### Initializing a connection
```javascript
var rpc = new XmlRpcConnection({
url: "http://", // URL to XML-RPC service
log: true, // If true, logs all requests to console
record: false // If true, records all requests and results to rpc._requests
});
```
All options are optional aside from the url.### Invoking a remote method.
```javascript
rpc.method_name('param1', 'param2', 'etc');
```
All the error handling is taken care of but if you like you can catch{} it. In addition, methods that fail return undefined.## Original License
Mimic (XML-RPC Client for JavaScript) v2.0.1
Copyright (C) 2005-2009 Carlos Eduardo Goncalves ([email protected])Mimic is dual licensed under the MIT (http://opensource.org/licenses/mit-license.php)
and GPLv3 (http://opensource.org/licenses/gpl-3.0.html) licenses.