Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyscott/quickroutes
https://github.com/andyscott/quickroutes
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/andyscott/quickroutes
- Owner: andyscott
- Created: 2016-01-26T06:34:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-27T00:47:15.000Z (almost 9 years ago)
- Last Synced: 2024-10-12T16:29:22.418Z (3 months ago)
- Language: Scala
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QuickRoutes #
QuickRoutes is a tool for building HTTP routes using a simple syntax.
The goal is to support various HTTP libraries. Initial support is played
for Spray routing.It's still in its early phases-- so expect more information to come.
``` scala
// QuickRoutes for Spray routing layer
val myRoute: Route = QuickRoutes().append {
case get"/users" ⇒
complete("get all users")case get"/users/$id" ⇒
complete(s"get user $id")case get"/users/$id/devices/${deviceId: DeviceId}" ⇒
complete(s"get $id's device $deviceId")case post"/installations" ⇒
complete("create a new installation")
}
```## License ##
This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html").