pashky/restclient.el

Unknown restclient hook type on-response

snowman opened this issue · 1 comments

restclient.el/restclient.el

Lines 565 to 570 in abc307b

(restclient-register-result-func
"run-hook" #'restclient-elisp-result-function
"Call the provided (possibly multi-line) elisp when the result
buffer is formatted. Equivalent to a restclient-response-loaded-hook
that only runs for this request.
eg. -> on-response (message \"my hook called\")" )

# Content type is loosely matched, could be application/vnd.whatever+json
GET http://httpbin.org/response-headers?Content-Type=application/vnd.whatever%2Bjson;%20charset=UTF-8
-> on-response (message "dynamic hook called %s %s"
(random ) (random ))
-> on-response (message "another hook")

should be change to run-hook (message "another hook")