xml_rpc 0.1.2 copy "xml_rpc: ^0.1.2" to clipboard
xml_rpc: ^0.1.2 copied to clipboard

outdatedDart 1 only

A library to communicate through the XML-RPC protocol.

xml_rpc #

Build Status

A library to communicate through the XML-RPC protocol.

Usage #

A simple usage example:

import 'package:xml_rpc/client.dart' as xml_rpc;

main() {
  final url = '...';
  xml_rpc
      .call(url, 'examples.getStateName', [41])
      .then((result) => print(result))
      .catchError((error) => print(error));
}

It will sent the following xml content:

<?xml version="1.0"?>
<methodCall>
  <methodName>examples.getStateName</methodName>
  <params>
    <param>
      <value><i4>41</i4></value>
    </param>
  </params>
</methodCall>

Every xmlrpc call has to be done with the call(...) function. You must give the url, the method name and the parameters. This function returns a Future with the result received. If the response contains a <fault> a Fault object is thrown and can be catch with the .catchError() on the Future.

To use this package from browser you can provide as client optional named argument on call a http.BrowserClient.

Parameter types #

Here are the conversion table.

xmlrpc Dart
<int> or <i4> int
<boolean> bool
<string> or Text String
<double> double
<dateTime.iso8601> DateTime
<base64> Base64Value
<struct> Map<String, dynamic>
<array> List

Features and bugs #

Please file feature requests and bugs at the issue tracker.

10
likes
0
pub points
77%
popularity

Publisher

unverified uploader

A library to communicate through the XML-RPC protocol.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, http, xml

More

Packages that depend on xml_rpc