Function: verb-show-request

verb-show-request is an interactive and natively compiled function defined in verb.el.

Signature

(verb-show-request)

Documentation

Show the corresponding HTTP request for a received response.

The request will be displayed in a format very similar in which it was written originally, on a separate buffer. Note that code tags will be shown with their values already evaluated. Some of the headers sent by url.el may also differ from the headers shown with this function, see the project's README.md file for more information. Return the buffer used to show the request.

Key Bindings

verb-response-body-mode-map C-c C-r C-s

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb-show-request ()
  "Show the corresponding HTTP request for a received response.
The request will be displayed in a format very similar in which it was
written originally, on a separate buffer.  Note that code tags will be
shown with their values already evaluated.  Some of the headers sent
by url.el may also differ from the headers shown with this function,
see the project's README.md file for more information.  Return the
buffer used to show the request."
  (interactive)
  (unless verb-response-body-mode
    (user-error "%s" "This buffer is not showing an HTTP response"))

  (let ((rs (oref verb-http-response request))
        (name (buffer-name)))
    (with-current-buffer (get-buffer-create "*Show HTTP Request*")
      ;; Set up buffer.
      (verb--ensure-org-mode)
      (verb--ensure-verb-mode)
      (erase-buffer)

      ;; Insert the request contents and show the buffer.
      (insert "* Corresponding HTTP request for response in "
              name)
      (newline)
      (insert (verb-request-spec-to-string rs))
      (switch-to-buffer-other-window (current-buffer)))))