Function: verb-response-to-string

verb-response-to-string is a byte-compiled function defined in verb.el.

Signature

(verb-response-to-string &rest ARGS)

Implementations

(verb-response-to-string (RESP verb-response) BUF) in `verb.el'.

Return HTTP response RESP as a string. BUF is the response buffer corresponding to this response object. The buffer must contain the response's processed body.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(cl-defmethod verb-response-to-string ((resp verb-response) buf)
  "Return HTTP response RESP as a string.
BUF is the response buffer corresponding to this response object.  The
buffer must contain the response's processed body."
  (with-temp-buffer
    (insert (oref resp status) "\n")
    (verb--insert-header-contents (oref resp headers))
    (insert "\n")
    (when (oref resp body)
      (insert "\n")
      (insert-buffer-substring buf))
    (verb--buffer-string-no-properties)))