~fsx/xmlrpc-go

clone

read-only
https://git.sr.ht/~fsx/xmlrpc-go
read/write
git@git.sr.ht:~fsx/xmlrpc-go

You can also use your local clone with git send-email.

#XML-RPC (server)

A small XML-RPC server.

The server does the bare minimum. It implements the net/http.Handler interface, does request decoding and response encoding, and handles errors.

See ./examples for two server examples. With the server-middleware example you can run the following commands:

curl --data @./testdata/getCurrentTimeRFC3339.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/getCurrentTimeUnix.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/getCurrentTimeWrongFormat.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/unknownMethod.xml http://127.0.0.1:4242/RPC2

This was part of a test and not completely finished. There's no client, not enough tests, and I think the middleware integration can be improved. But for now it's good enough.

Feel free to send a patch to the mailinglist.

Install with:

go get git.sr.ht/~fsx/xmlrpc-go@latest
Do not follow this link