1
0
hugo/old/2016-08-01-swift-swiftra.md
2024-12-21 16:29:14 +09:00

607 B

+++ date = "2016-08-01" tags = ["memo"] title = "swift-swiftra" slug = "swift-swiftra" +++

swiftraというものがあります。名前からも分かるようにsinatraをリスペクトして作成されているぽい。

$ git clone https://github.com/takebayashi/swiftra-example.git
$ cd swiftra-example
$ swift build
$ ./.build/debug/swiftra-example
$ curl 'http://localhost:8080/abc'
/abc was requested with GET
$ curl -X POST -d foo=bar 'http://localhost:8080/abc'
/abc was requested with POST, body = foo=bar