XML-RPC protocol support for Swift.
An XML-RPC parser and a simple XML-RPC client object based upon URLSession
(if available).
Performing a simple call:
#!/usr/bin/swift sh
import XmlRpc // helje5/SwiftXmlRpc
let client = XmlRpc.createClient("https://www.xmlrpc.com/RPC2")
let methods = try client.system.listMethods()
The package also contains a small XML-RPC commandline client. It can be invoked like that:
swift run xmlrpc_call "http://yourserver/RPC2" system.listMethods
Learn more about XML-RPC in Swift in our blog article: Writing an Swift XML-RPC Server.
Note: Being so old many XML-RPC services still in use are using the ISO Latin 1 charset, which is why the client defaults to that. When interfacing with a newer service, the encoding parameter in createClient may have to be used to configure it for UTF-8.
Swift XML-RPC is brought to you by Helge Heß / ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.
Want to support my work? Buy an app: Code for SQLite3, Past for iChat, SVG Shaper, HMScriptEditor. You don't have to use it! 😀