npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

coc-rest

v0.2.0

Published

A coc-post or vim-rest-console plugin but with more features.

Downloads

20

Readme

coc-rest

A powerful rest client with many features

Features

  • Workspaces for organizing requests into logical groups
  • Global config per workspace that gets applied to all requests in a workspace
  • Syntax highlighting on output
  • Variables
  • Multiple requests
  • Simple YAML syntax

Install

:CocInstall coc-rest

If you want syntax highlighting then you'll need these plugins

Plug 'inkarkat/vim-ingo-library' Plug 'inkarkat/vim-SyntaxRange'

Keymaps

Some useful key mappings

  • nnoremap <silent> <leader>rs :CocCommand coc-rest.send<cr>
  • nnoremap <silent> <leader>rr :CocList rests<cr>
  • nnoremap <silent> <leader>rw :CocList workspaces<cr>

Lists

:CocList workspaces

:CocList rests

Examples

Create A Workspace

  1. :CocList workspaces
  2. Tab
  3. (n)ew
  4. Enter in new name for workspace

After step 4 you'll see a global.yaml file open with the following

baseURL: 
headers:
variables:

Here is where you'll put your baseURL and any headers that should be applied to any request in this workspace.

An example would look like this

baseURL: http://localhost:8000/api
headers:
    Content-Type: application/json

Create A REST

  1. :CocList workspaces
  2. Select the workspace to create the REST in.
  3. Tab
  4. (n)ew
  5. Enter in new name for REST

After step 5 you'll see a file with the name you typed in above with the following fields

url: 
method: 
headers:
params:
data:
variables:
---

An example would look like

url: /cats
method: post
headers:
params:
data:
    name: whiskers
    color: black

Building off of the global config, the request will looks like

curl -X POST http://localhost:8000/api/cats -H "Content-Type: applicatoin/json" -d '{"name": "wiskers", "color": "black"}'

Create A REST 2

If you set coc-rest.pin-workspace in your CocConfig, either local or global then you can skip going through the workspace list and go straight to :CocList rests. This will take you to the workspace you have pined.

Variables

Variables work like template literals in javascript.

url: /${path}
method: post
headers:
params:
data:
    name: whiskers
    color: black
variables:
    path: cats

Will give you

curl -X POST http://localhost:8000/api/cats -H "Content-Type: applicatoin/json" -d '{"name": "wiskers", "color": "black"}'

Variables can be specified in the global file and will be applied to all rests just like the config section.

Sending Multiple Requests Per REST File

To send more than one request per REST file just add another config section to the rest

url: /${path}
method: post
headers:
params:
data:
    name: whiskers
    color: black
variables:
    path: cats
---
url: /${path}
method: post
headers:
params:
data:
    name: spot
    color: brown
variables:
    path: dogs

Please note that the variables from the first request don't propagate to the next request. In the example above, variables.path, must be supplied for both requests for the url to be interpolated. If path was the same then it may make sense to move that variable to the global file for this workspace.

License

MIT


This extension is created by create-coc-extension