mirror of https://github.com/rwf2/Rocket.git
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];
|
||
|
}
|