Restapi

Httpie

got in touch with httpie, a restapi client for the cli

install

doas pkg_add httpie

Hello World

let’s do a little test

$ https httpie.io/hello

HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json; charset=utf-8
age: 0
cache-control: public, max-age=0, must-revalidate
content-length: 264
date: Wed, 10 Nov 2021 17:34:19 GMT
etag: "108-yw+Xn8xsGAsJIUMQvDLN7gAcQuc"
server: Vercel
strict-transport-security: max-age=63072000
x-matched-path: /api/hello
x-vercel-cache: MISS
x-vercel-id: fra1::iad1::4kmc7-1636565659646-cf763c94cea0

{
    "ahoy": [
        "Hello, World! 👋 Thank you for trying out HTTPie 🥳",
        "We hope this will become a friendship."
    ],
    "links": {
        "discord": "https://httpie.io/discord",
        "github": "https://github.com/httpie",
        "homepage": "https://httpie.io",
        "twitter": "https://twitter.com/httpie"
    }
}

Examples

Custom HTTP method, HTTP headers and JSON data: