Function: verb--http-headers-p

verb--http-headers-p is a natively compiled function defined in verb.el.

Signature

(verb--http-headers-p H)

Documentation

Return non-nil if H is an alist of (KEY . VALUE) elements.

KEY and VALUE must be strings. KEY must not be the empty string.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb--http-headers-p (h)
  "Return non-nil if H is an alist of (KEY . VALUE) elements.
KEY and VALUE must be strings.  KEY must not be the empty string."
  (when (consp h)
    (catch 'end
      (dolist (elem h)
        (unless (and (consp elem)
                     (stringp (car elem))
                     (stringp (cdr elem))
                     (not (string-empty-p (car elem))))
          (throw 'end nil)))
      t)))