mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-22 09:22:03 +00:00
16 lines
262 B
Rust
16 lines
262 B
Rust
#![feature(plugin, custom_derive)]
|
|
#![plugin(rocket_codegen)]
|
|
|
|
extern crate rocket;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
#[post("/<a>/<b..>")]
|
|
fn get(a: String, b: PathBuf) -> String {
|
|
format!("{}/{}", a, b.to_string_lossy())
|
|
}
|
|
|
|
fn main() {
|
|
let _ = routes![get];
|
|
}
|