lang/rest: minor refactor

This commit is contained in:
Henrik Lissner 2020-03-27 20:11:28 -04:00
parent e73a01bcbd
commit c22d4e42a9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -2,18 +2,18 @@
(use-package! restclient
:mode ("\\.http\\'" . restclient-mode)
;; line numbers aren't enabled by default in fundamental-mode-derived modes
:hook (restclient-mode . display-line-numbers-mode)
:config
(set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other)
;; line numbers aren't enabled by default in fundamental-mode-derived modes
(add-hook 'restclient-mode-hook #'display-line-numbers-mode)
;; TODO PR this upstream! This adds imenu support to `restclient-mode'
(setq-hook! 'restclient-mode-hook
imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0)))
(defadvice! +rest--permit-self-signed-ssl-a (orig-fn &rest args)
"Forces underlying SSL verification to prompt for self-signed or invalid
certs, rather than silently reject them."
certs, rather than reject them silently."
:around #'restclient-http-do
(let (gnutls-verify-error tls-checktrust)
(apply orig-fn args)))