hur

Crates.iohur
lib.rshur
version0.1.0
sourcesrc
created_at2022-11-27 15:33:43.795931
updated_at2022-11-27 15:33:43.795931
descriptionCLI HTTP requests, nothing more complicated than that.
homepagehttps://github.com/vkstrm/hur
repositoryhttps://github.com/vkstrm/hur
max_upload_size
id723800
size66,319
Viktor Ekström (vkstrm)

documentation

README

HUR

Command-line utility for making HTTP requests.

Note: This program is not better than Curl. It will contain bugs and is unlikely to fully conform to the HTTP specification. I am however having fun writing it and find it to be useful in some situations.

Usage

GET is the default method.

hur https://petstore.com/animals -h "header:value"

To use another method add --method

hur https://petstore.com/animals --method POST --body '{"name":"Luffy"}'

Using --verbose mode will print, in JSON, the request and response objects.

{
    "request": {
        "method": "GET",
        "headers": {},
        "path": "/animals",
        "etc" "..."
    },
    "response": {
        "statusCode": 200,
        "body": "{}",
        "etc": "..."
    }
}

Use --help for more information.

Proxy

Proxy support with HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables. Disable proxy for a request using --no-proxy

Dependencies

On Ubuntu, in addition to Rust, you will need sudo apt install build-essential libssl-dev pkg-config. Or Cargo will tell you what you need most likely.

Commit count: 66

cargo fmt