/get_request

How to make GET requests using Rust lang

Primary LanguageRust

JSON GET request's of from the command line using Rust's cargo and optionally jq

Download

git clone https://github.com/jasonleonhard/get_request

Enter

cd get_request

Run

cargo run "https://jasonleonhard.com/pins/12"

Run with tracer

RUST_LOG=trace cargo run "https://jasonleonhard.com/pins/12" | jq

Optional

This is currently written to allow GET requests of any arbitrary text, JSON or otherwise.

Simply avoid the | jq at the end of the command to treat as standard text.

brew install jq
cargo run "https://jasonleonhard.com/pins/12" | jq

Test

cargo test