Skip to content

grqphical/rest.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest.nvim

A simple HTTP client for Neovim that you edit like a buffer

Installation

NOTE: rest.nvim requires you to have curl installed and added to your PATH

vim.pack (Neovim 0.12+)

vim.pack.add({ src = "https://github.com/grqphical/rest.nvim" })

lazy.nvim

{
    "grqphical/rest.nvim",
}

Usage

To create a new request, run the command :NewRequest. This will open a new empty buffer where you can start writing out the parameters of your request. Below is an example of a request:

url: https://httpbin.org/post
method: POST
header: Content-Type: application/json
body: {"foo":"bar"}

You can read more about the rest.nvim request language on the wiki

To send the request, simply write the buffer with :w and the HTTP response will appear in a new buffer

Sending files

Since rest.nvim is a frontend for curl, you can send entire files in the body of a request with:

body: @file.txt

Saving requests or responses

If you have a request or a response you wish to save to a file simply run :RestSave, optionally add a file path and rest will save the contents of the current request/response to a file

Configuration

If you wish to configure rest.nvim use the code below in your init.lua:

require("rest").setup {
    -- configuration here
}

You can read more about configuring rest.nvim on the wiki

License

rest.nvim is licensed under the MIT License

About

A simple HTTP client for Neovim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages