An open API service indexing awesome lists of open source software.

https://github.com/nchern/red

Console User Interface(CUI) for HTTP API
https://github.com/nchern/red

api command-line cui debug http testing vim

Last synced: 7 months ago
JSON representation

Console User Interface(CUI) for HTTP API

Awesome Lists containing this project

README

          

[![Go Report Card](https://goreportcard.com/badge/github.com/nchern/red)](https://goreportcard.com/report/github.com/nchern/red)

RED (Request EDitor)
==

RED is a Console User Interface(CUI) that helps to make HTTP requests to different APIs from your favourite console text editor. You can think of it like a notebook for API requests.
Alpha version, tested with Vim only ;)
In the current version empty or JSON request body is supported.

Install
===

```go
go get github.com/nchern/red/...
```

Usage
===

```bash
red # Opens editor for editing requests in a query file

red run # runs the query from a query file

red example # Outputs self-explainable query file body. You can get an idea about query file syntax from it
```

Vim integration
===

[Install plugin](vim/README.md)

You have now a family of `:Red*` commands feel free to explore them.
The main one is `:RedQuery` - runs the current file or a selected query as on screenshots below

Screenshots
====
![Overview](https://github.com/nchern/red/blob/master/screenshots/general.png)

![Query selection example](https://github.com/nchern/red/blob/master/screenshots/selection.png)

Other editors support
===
Exists in theory, not tested. However, there are a couple of env variables to control an editor invocation:
* `EDITOR` - an editor command name, defaults to `vim`
* `EDITOR_FLAGS` - flags to pass to the editor

The utility calls then an editor with the following command line:
```bash

```

Inspired by
===
* [Sense](https://chrome.google.com/webstore/detail/sense-beta/lhjgkmllcaadmopgmanpapmpjgmfcfig?hl=en)
* [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en)