All Projects → hazbo → Httpu

hazbo / Httpu

Licence: gpl-2.0
The terminal-first http client

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Httpu

resto
🔗 a CLI app can send pretty HTTP & API requests with TUI
Stars: ✭ 113 (-81.74%)
Mutual labels:  http-client, user-interface, terminal-based
Ftxui
💻 C++ Functional Terminal User Interface. ❤️
Stars: ✭ 433 (-30.05%)
Mutual labels:  terminal-based, terminal, user-interface
Tview
Terminal UI library with rich, interactive widgets — written in Golang
Stars: ✭ 6,266 (+912.28%)
Mutual labels:  terminal-based, user-interface
robotframework-httprequestlibrary
Robot Framework's library to test REST interfaces utilizing Apache HttpClient
Stars: ✭ 20 (-96.77%)
Mutual labels:  http-client, http-requests
Node Request Retry
💂 Wrap NodeJS request module to retry http requests in case of errors
Stars: ✭ 330 (-46.69%)
Mutual labels:  http-client, http-requests
nativescript-http
The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning
Stars: ✭ 32 (-94.83%)
Mutual labels:  http-client, http-requests
Redes
High-level network layer abstraction library written in Swift.
Stars: ✭ 16 (-97.42%)
Mutual labels:  http-client, http-requests
Termox
C++17 Terminal User Interface(TUI) Library.
Stars: ✭ 306 (-50.57%)
Mutual labels:  terminal, user-interface
relay
Relay lets you write HTTP requests as easy to read, structured YAML and dispatch them easily using a CLI. Similar to tools like Postman
Stars: ✭ 22 (-96.45%)
Mutual labels:  http-client, http-requests
Py cui
A python library for intuitively creating CUI/TUI interfaces with widgets, inspired by gocui.
Stars: ✭ 380 (-38.61%)
Mutual labels:  terminal-based, terminal
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-44.26%)
Mutual labels:  terminal-based, terminal
Karin
An elegant promise based HTTP client for the browser and node.js [WIP]
Stars: ✭ 393 (-36.51%)
Mutual labels:  http-client, http-requests
centra
Core Node.js HTTP client
Stars: ✭ 52 (-91.6%)
Mutual labels:  http-client, http-requests
requester
The package provides a very thin wrapper (no external dependencies) for http.Client allowing the use of layers (middleware).
Stars: ✭ 14 (-97.74%)
Mutual labels:  http-client, http-requests
EthernetWebServer
This is simple yet complete WebServer library for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21/SAMD51, nRF52, STM32, RP2040-based, etc. boards running Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Coexisting now with `ESP32 WebServer` and…
Stars: ✭ 118 (-80.94%)
Mutual labels:  http-client, http-requests
swish
C++ HTTP requests for humans
Stars: ✭ 52 (-91.6%)
Mutual labels:  http-client, http-requests
Spotui
Spotify in the terminal 💻🎶
Stars: ✭ 302 (-51.21%)
Mutual labels:  terminal-based, terminal
1c http
Подсистема 1С для работы с HTTP
Stars: ✭ 48 (-92.25%)
Mutual labels:  http-client, http-requests
Http Shortcuts
Android app to create home screen shortcuts that trigger arbitrary HTTP requests
Stars: ✭ 329 (-46.85%)
Mutual labels:  http-client, http-requests
Dstask
Single binary terminal-based TODO manager with git-based sync + markdown notes per task
Stars: ✭ 431 (-30.37%)
Mutual labels:  terminal-based, terminal

httpu

httpu

httpu is a terminal first, general purpose HTTP client, designed to get you interacting with all aspects of an HTTP API within just a few seconds. This makes it a good tool for testing out various endpoints, methods, payloads - so you are able to see what's being sent, and what response you are then getting.

Getting started

Installing

macOS

brew tap httpu/httpu
brew install httpu

Building from source

cd $GOPATH
mkdir -p src/github.com/hazbo
cd src/github.com/hazbo
git clone [email protected]:hazbo/httpu.git
cd httpu
make

Basic usage

I started writing this project whilst working with the Moltin API, which is a headless commerce API, so there are a few examples using that, if you want to play around with that, just head to the website, get your API keys and you are good to go!

Once httpu has been installed, you can get started either by first pulling down the preconfigured packages:

httpu pull

And then loading the configuration of a package into httpu like so:

httpu new moltin

or by creating your own configuration. A basic project may look like the following:

mkdir -p httpbin/requests
touch httpbin/project.json httpbin/requests/ip.json

httpbin/project.json

{
  "project": {
    "url": "https://nghttp2.org/httpbin",
    "resourceFiles": [
      "httpbin/requests/ip.json"
    ]
  }
}

httpbin/requests/ip.json

{
  "kind": "request",
  "name": "ip",
  "spec": {
    "uri": "/ip",
    "method": "GET"
  }
}

Once you have that setup, you're ready to run httpu!

httpu new httpbin

When the UI has loaded, typing in ip (the name of the request) into the prompt, followed by hitting enter will run that request and you will be able to see the response body in the right-hand window. In this case, it will simply just return your IP address from which the request has been made.

Keybinding Description
Up Switch to command mode
Down Switch to default mode
Left Move cursor to request view
Right Move cursor to response view
Ctrl+w Move cursor from request / response view to the prompt
Ctrl+s Switch the cursor from request view to response view
Ctrl+c Quit

To see what commands are available, switch to command mode, then type in list-commands.

Advanced usage

httpu is able to look at a JSON response, take a given value and store it in memory, to then be used for another request. This in-memory store is called the stash. So for example, in the previous example, if you wanted to store the IP address that is returned, and use it else where, the request file may look like this:

httpbin/requests/ip.json

{
  "kind": "request",
  "name": "ip",
  "spec": {
    "uri": "/ip",
    "method": "GET",
    "stashValues": [
      {
        "name": "my-ip",
        "jsonPath": "origin"
      }
    ]
  }
}

and then in a seperate request you can then access it, once the ip request has been made, like so:

httpbin/requests/get.json

{
  "kind": "request",
  "name": "get",
  "spec": {
    "uri": "/get?ip=${stash[ip]}",
    "method": "GET"
  }
}

with ${stash[ip]} being a variable created after running the ip request.

For more examples for advanced usage including the stash, sending request data, using environment variables etc... head over to the packages repo and check out the example I've started creating for the Moltin API.

Coming soon

  • A view to display response headers (priority)
  • Creating a request flow
  • Creating tests for a request or set of requests
  • Various UI tweaks
  • An HTTP API interface

Known issues

This project is in its very early stages, so there will be things that need fixing. One issue at the moment is a problem with parsing stashed variables into request data before a request has been made. If this happens, and you are seeing ${stash[var_name]}, just fire the request again and it should work.

Contributing

  • Fork httpu
  • Create a new branch (git checkout -b my-feature)
  • Commit your changes (git commit)
  • Push to your new branch (git push origin my-feature)
  • Create new pull request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].