mii-http 0.1.0

Turn a .http specs file into a real HTTP server, backed by the shell commands you already have.
Documentation
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    use mii_http::parse::exec::parse_exec;
    let cases = ["echo Hello, [%name] [%guest]", "$ | xargs echo", "echo title=[$.title] count=[$.count]", "echo user [:user_id]"];
    for c in &cases {
        println!("--- {}", c);
        match parse_exec(c, 0) {
            Ok(stages) => for s in &stages { println!("  {:#?}", s); },
            Err(e) => println!("  ERR: {} @ {:?}", e.message, e.span),
        }
    }
}