Function: verb--override-url

verb--override-url is a natively compiled function defined in verb.el.

Signature

(verb--override-url ORIGINAL OTHER)

Documentation

Override URL struct ORIGINAL with OTHER.

Do this using the rules described in verb-request-spec-override.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb--override-url (original other)
  "Override URL struct ORIGINAL with OTHER.
Do this using the rules described in `verb-request-spec-override'."
  ;; If either url is nil, return the other one.
  (if (not (and original other))
      (or original other)
    ;; Override ORIGINAL with OTHER.
    (let ((scheme (or (url-type other) (url-type original)))
          (user (or (url-user other) (url-user original)))
          (password (or (url-password other) (url-password original)))
          (host (or (url-host other) (url-host original)))
          (port (or (verb--url-port other) (verb--url-port original)))
          (path (verb--override-url-paths (url-path-and-query original)
                                          (url-path-and-query other)))
          (fragment (or (url-target other) (url-target original)))
          (attributes (or (url-attributes other) (url-attributes original)))
          (fullness (or (url-fullness other) (url-fullness original))))
      (url-parse-make-urlobj scheme user password host
                             port path fragment
                             attributes fullness))))