Function: verb--get-handler

verb--get-handler is a natively compiled function defined in verb.el.

Signature

(verb--get-handler CONTENT-TYPE)

Documentation

Return a handler from verb-content-type-handlers for a CONTENT-TYPE.

CONTENT-TYPE must be the value returned by verb--headers-content-type.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb--get-handler (content-type)
  "Return a handler from `verb-content-type-handlers' for a CONTENT-TYPE.
CONTENT-TYPE must be the value returned by `verb--headers-content-type'."
  (when (car content-type)
    (catch 'end
      (dolist (key-value verb-content-type-handlers)
        (let ((case-fold-search t)
              (regexp (car key-value))
              (handler (cdr key-value)))
          (when (string-match-p regexp (car content-type))
            (throw 'end handler)))))))