Skip to content

nchern/red

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card

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 get github.com/nchern/red/...

Usage

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

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

Query selection example

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:

<EDITOR> <EDITOR_FLAGS> <query-filename> 

Inspired by