#cli #surf

app longboard

the easy way to surf

4 releases

0.0.2-alpha.4 Oct 13, 2020
0.0.2-alpha.2 Oct 12, 2020

#70 in Filesystem

MIT/Apache and LGPL-3.0-or-later

141 lines

Longboard: The easy way to surf

$ longboard get https://async.rs

TODO for this to be useful

  • request bodies
    • from filesystem
    • as a cli arg
    • from stdin (pipe)
  • request headers
  • opt into / out of displaying different parts of request and response
  • http status -> exit codepp


$ cargo install longboard --version 0.0.2-alpha.4


longboard 0.0.2-alpha.4
the easy way to surf

    longboard [OPTIONS] <method> <url>

        --help       Prints help information
    -V, --version    Prints version information

    -b, --body <body>             provide a request body on the command line
    -c, --client <client>         http backend for surf. options: h1, curl, hyper [default: h1]
    -f, --file <file>             provide a the path to a file to use as the request body
    -h, --headers <headers>...    provide headers in the form -h KEY1=VALUE1 KEY2=VALUE2


Examples to try:

$ longboard get http://httpin.org/get
$ longboard get https://httpbin.org/headers -h Some-Header="header value" User-Agent=longboard
$ longboard post https://httpbin.org/post -b "this is a request body"
$ longboard post http://httpbin.org/anything -b "a=b&c=d" -h content-type=application/x-www-form-urlencoded
$ longboard put https://httpbin.org/put -f ./Cargo.toml -h content-type=application/toml
$ longboard patch https://httpbin.org/patch < ./some-file
$ cat /dev/random | head -c1000 | base64 | longboard post https://httpbin.org/anything 


This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.


Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~621K SLoC