Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximbaz/restclient.kak
HTTP REST client for Kakoune
https://github.com/maximbaz/restclient.kak
kakoune kitty plugin rest rest-api rest-client
Last synced: 9 days ago
JSON representation
HTTP REST client for Kakoune
- Host: GitHub
- URL: https://github.com/maximbaz/restclient.kak
- Owner: maximbaz
- Created: 2019-07-17T22:10:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-21T09:58:40.000Z (about 1 year ago)
- Last Synced: 2024-10-11T23:37:03.919Z (about 1 month ago)
- Topics: kakoune, kitty, plugin, rest, rest-api, rest-client
- Language: KakouneScript
- Size: 12.7 KB
- Stars: 10
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# restclient.kak
REST client for [kakoune](https://github.com/mawww/kakoune/), highly inspired by [restclient.el](https://github.com/pashky/restclient.el) for Emacs.
![screenshot](https://user-images.githubusercontent.com/1177900/61742286-0c51dc80-ad93-11e9-9b85-994957576f7f.png)
## Requirements
- `python`
## Usage
Open a file with `.rest` extension, or just activate the module using `:set buffer filetype restclient`.
Write a query in kakoune in the following format:
```
# GitHub API overview, with sending a custom header
GET https://api.github.com
User-Agent: kakoune# Split query blocks using ###
#### Variables must begin with : symbol and can be referenced anywhere in any following block
:github = api.github.com
:api = feeds
:userAgent = User-Agent: kakouneGET https://:github/:api
:userAgent###
# Request body must go after an empty line
POST https://jira.atlassian.com/rest/api/2/search
Content-Type: application/json
:userAgent{
"jql": "project = HSP",
"startAt": 0,
"maxResults": 15,
"fields": [
"summary",
"status",
"assignee"
]
}
```Put cursor somewhere inside the block and execute `:restclient-execute`.
You can also copy the request as cURL command using `:restclient-copy-as-curl`.
The command used to copy to clipboard is specified using `restclient_copy_command` option (`wl-copy` by default).