xmlrpcc-d 0.2.1

XML RPC client library for D Programming Language


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

XML-RPC client for D Programming Language

Based on Pavel Kirienko library.

Basic usage

import xmlrpcc.client;

auto client = new Client("http://phpxmlrpcc.sourceforge.net/server.php");

double resp1 = client.call!("examples.addtwodouble", double)(534.78, 168.36);
assert(approxEqual(resp1, 703.14));

string resp2 = client.call!("examples.stringecho", string)("Hello Galaxy!");
assert(resp2 == "Hello Galaxy!");

real resp2_1 = client.call!("examples.stringecho", real)("123.456"); // IMPLICIT CONVERSION
assert(approxEqual(resp2_1, 123.456));

int[string] resp3 = client.call!("validator1.countTheEntities", int[string])("A < C ' > 45\" 12 &");
assert(1 == resp3["ctQuotes"]);
assert(1 == resp3["ctLeftAngleBrackets"]);
assert(1 == resp3["ctRightAngleBrackets"]);
assert(1 == resp3["ctAmpersands"]);
assert(1 == resp3["ctApostrophes"]);

int[string][] arrayOfStructs = [["moe" : 1, "larry" : 2, "curly" : 3], ["moe" : -98, "larry" : 23, "curly" : -6]];
int resp4 = client.call!("validator1.arrayOfStructsTest", int)(arrayOfStructs);
assert(resp4 == -3);

Test

Unit test uses Online demo server.

$ dub test

Compiling

You can use dub:

$ dub build

Or (on linux) makefile:

$ make release

Requirements

Authors:Pavel Kirienko, Orfeo Da Viá

Dependencies: none

Versions:
0.2.1 2016-Apr-13
0.2.0 2016-Apr-11
0.1.1 2016-Apr-08
~master 2017-Feb-23
Show all 4 versions
Stats:

statistics are temporarily disabled.