Registry / Framework

framework · v0.1.0
Swiftlet
Dispatch a method and request path against a table of literal and parameterized routes. Return a matched template and the methods a client can use.
Use Swiftlet
use vendor::swiftlet::swiftlet;
Run the example
nest demo swiftlet@0.1.0
blyxc native-run swiftlet-demo/main.blyx
Example source and expected output
use vendor::swiftlet::swiftlet;
fn main() {
let methods = sw_enable(sw_enable(0, "GET"), "POST");
println!(sw_status(true, methods, "GET"));
println!(sw_status(true, methods, "DELETE"));
println!(sw_status(false, methods, "GET"));
}
Expected output
200
405
404
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 3019450b9a | d030bc56250e3913db8c337230afec45e5c7c714230f5ccb31a696f5ea1652c8 |