XML-RPC support for MacroExpress.
This is covered in the Writing an Swift XML-RPC Server blog entry.
#!/usr/bin/swift sh
import MacroExpress // @Macro-swift
import MacroXmlRpc // @Macro-swift
let app = express()
app.route("/RPC2")
.use(bodyParser.xmlRpcCall())
.rpc("ping") { _ in "pong" }
.rpc("add") { ( a: Int, b: Int ) in a + b }
.use(xmlrpc.introspection())
app.listen(1337)macro.core.numthreadsmacro.core.iothreadsmacro.core.retain.debugmacro.concat.maxsizemacro.streams.debug.rcmacro.router.debugmacro.router.matcher.debugmacro.router.walker.debug
This doesn't support async/await yet as proper streaming
would require custom executors. Which are not yet available.
Maybe a temporary measure would be appropriate just for XML-RPC (which rarely has streaming consumers/producers).
- Writing an Swift XML-RPC Server
- MacroExpress.
- Macro
- XML-RPC Homepage
- XML-RPC Spec
- XML-RPC for Newbies
- Original site
- XML-RPC HowTo by Eric Kidd
- Python Client
Macro XML-RPC is brought to you by the Helge Heß and ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.
There is a #microexpress channel on the
Noze.io Slack. Feel free to join!