-
-
Save steinarb/655b632c5f453f0d92bf346a1ac3f96a to your computer and use it in GitHub Desktop.
Hook function to save GET body from restclient.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- lexical-binding: t; -*- | |
(require 'restclient-jq) | |
(defun restclient-save-body (args args-offset) | |
(save-match-data | |
(let ((filename (expand-file-name args))) | |
(lambda () | |
(with-current-buffer restclient-same-buffer-response-name | |
(write-region (point-min) (restclient-jq-result-end-point) filename)))))) | |
(provide 'sb-restclient) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment