Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vartzy/neocurl

Simple, effective and fast HTTP Client based on curl for neovim (<5kb).
https://github.com/vartzy/neocurl

curl http http-client neovim nvim plugin vim

Last synced: 23 days ago
JSON representation

Simple, effective and fast HTTP Client based on curl for neovim (<5kb).

Awesome Lists containing this project

README

        

```
_ __ ___ ___ ___ _ _ _ __ -
| '_ \ / _ \/ _ \ / __| | | | '__| |
| | | | __/ (_) | (__| |_| | | | |
|_| |_|\___|\___/ \___|\__,_|_| |_|
```
## Simple, effective and fast HTTP Client based on curl for neovim
[neocurl-demo.webm](https://github.com/user-attachments/assets/bc010a08-54ac-4970-847b-743c18bc4848)

Directly plug lightweight http client to your neovim without overwhelming setup and configuration. The neocurl plugin are designed for ease to use and getting work done fast so you can focus on your development!

### Installation

- Packer

```use 'vartzy/neocurl'```

Lazy load it (Recommended)
```use {'vartzy/neocurl', ft = 'http'}```

- Vim Plug

```Plug 'vartzy/neocurl'```

- Lazy

```"vartzy/neocurl"```

### Depedencies

- curl
- jq (optional -- recommended for pretty print)

- Windows (via Scoop)
```
scoop install main/curl
scoop install main/jq
```

- Mac

```brew install jq```

- Linux

```sudo apt install jq```

### Using neocurl example

- Create .http file
```
### Register user
POST http://localhost:3000/api/users
Content-Type: application/json
Accept: application/json

{
"username": "VArtz",
"password" : "secret123",
"name" : "Farrel Nikoson"
}

### Login User
POST http://localhost:3000/api/users/login
Content-Type: application/json
Accept: application/json

{
"username": "VArtz",
"password" : "secret123"
}

### Get User
GET http://localhost:3000/api/users/current
Accept: application/json
X-API-TOKEN: 25edd380-731c-4d9f-ac9b-b49f01e205bd
```

- Select block that you want to run with place your cursor in block area
```
### Get User // place your cursor here
GET http://localhost:3000/api/users/current // or here
Accept: application/json // or here
X-API-TOKEN: 25edd380-731c-4d9f-ac9b-b49f01e205bd// or here
// or here
### Another... // This will run another block
```

- Run :Http, :Httpv or :Httpd in nvim command

```:Http``` -- **only request with Accept header will formated**

```:Httpv``` -- verbose version (using curl -v)

```:Httpd``` -- debug mode, curl statement will appear on statusline

- Seperate window will appear and provide response from curl http request with time measurre in second

**You may check or contributing [wiki page](https://github.com/VArtzy/neocurl/wiki) to cover another case example.**