Merge pull request #168 from CestDiego/restclient-layer
Add RESTclient layer
This commit is contained in:
commit
0b15c9bb02
18
contrib/restclient/README.md
Normal file
18
contrib/restclient/README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Restclient contribution layer
|
||||||
|
|
||||||
|
## What is this?
|
||||||
|
This is a package that lets you have a REPL-like interface
|
||||||
|
for http requests. Full documentation and examples can be found in the
|
||||||
|
package's [GitHub Page](https://github.com/pashky/restclient.el).
|
||||||
|
|
||||||
|
Also there is an [Emacs Rocks!](http://emacsrocks.com/e15.html) episode of it.
|
||||||
|
|
||||||
|
## Keybindings
|
||||||
|
|
||||||
|
| Key Binding | Description |
|
||||||
|
|------------------------------------|------------------------------------------------------------------------------------|
|
||||||
|
| <kbd>SPC m s</kbd> | Send and stay in window (pretty-print response if possible) |
|
||||||
|
| <kbd>SPC m S</kbd> | Send and switch window (pretty-print response if possible) |
|
||||||
|
| <kbd>SPC m r</kbd> | Send and stay in window (do not attempt to pretty-print) |
|
||||||
|
| <kbd>SPC m R</kbd> | Send and switch window (do not attempt to pretty-print) |
|
||||||
|
|
25
contrib/restclient/packages.el
Normal file
25
contrib/restclient/packages.el
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
(defvar restclient-packages
|
||||||
|
'(
|
||||||
|
restclient
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun restclient/init-restclient ()
|
||||||
|
(use-package restclient
|
||||||
|
:mode ("\\.http\\'" . restclient-mode)
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(progn
|
||||||
|
|
||||||
|
(defun restclient-http-send-current-raw-stay-in-window ()
|
||||||
|
(interactive)
|
||||||
|
(restclient-http-send-current t t))
|
||||||
|
|
||||||
|
(evil-leader/set-key-for-mode 'restclient-mode
|
||||||
|
"ms" 'restclient-http-send-current-stay-in-window
|
||||||
|
"mS" 'restclient-http-send-current
|
||||||
|
"mr" 'restclient-http-send-current-raw-stay-in-window
|
||||||
|
"mR" 'restclient-http-send-current-raw
|
||||||
|
))
|
||||||
|
)
|
||||||
|
)
|
Loading…
Reference in a new issue