Vim REST Console

Alex R. Young
usevim
Published in
1 min readJun 28, 2015

Vim REST Console (GitHub: diepm/vim-rest-console, License: MIT) is a plugin for sending and viewing HTTP requests from RESTful services. It uses cURL, and allows you to type URLs and then get responses back in a separate window.

To make a request, you need to be in a buffer with a file type of “rest”: :set ft=rest. Then, type the protocol and hostname on one line, followed by the HTTP method and path on another:

http://localhost:9200
GET /_cat/nodes?v

Once you’re ready type the trigger key to make the request, which is C-j by default. The results will be displayed in a split window.

You can also include JSON for POST requests:

http://localhost:9200
POST /testindex/testtype
{
"key": "new key",
"value": "new value"
}

The plugin has some optional configuration values — you can change the trigger key with g:vrc_trigger, turn on SSL certificate checking, and change the default Content-Type header.

--

--