hxr

Crates.iohxr
lib.rshxr
version0.1.0
sourcesrc
created_at2024-11-19 21:29:27.745932
updated_at2024-11-19 21:29:27.745932
descriptionA simple HTTP request CLI tool
homepage
repository
max_upload_size
id1453876
size46,395
MJ Anglin (clxrityy)

documentation

README

hxr

A simple HTTP request CLI tool


Installation

cargo install hxr
Ensure ~/.cargo/bin is in your PATH
echo $PATH
  • If needed, add it manually to your shell configuration:
export PATH="$HOME/.cargo/bin:$PATH"
  • Run the hxr command directly from the terminal:
hxr --help

Usage

hxr https://api.ipify.org/
  • Make a POST request
hxr -m POST https://api.example.org/ -b bodyToSend

Adding headers

With Headers

Run the command with headers:

  • Adding JSON as the content type will prettify the JSON in the terminal
hxr --method GET https://httpbin.org/headers -h "content-type:application/json" -h "Authorization:Bearer token123"
Without Headers

Run a simple GET request:

hxr -m GET https://api.ipify.org/

Commit count: 0

cargo fmt