Giter Site home page Giter Site logo

xml-rpc.js's Introduction

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

var rpc = new XmlRpcConnection({
    url:    "http://<some_url>",    // 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.

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.

xml-rpc.js's People

Contributors

sefffal avatar

Stargazers

Alex Adusei avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.