Hello, thanks for the digest!

On 05/01/2026 17:57 -0500, Sacha Chua wrote:

>       - Sacha Chua: Emacs Lisp: Making a multi-part form PUT or POST using 
> url-retrieve-synchronously and mm-url-encode-multipart-form-data 
> https://sachachua.com/blog/2025/12/emacs-lisp-making-a-multi-part-form-put-or-post-using-url-retrieve-synchronously-and-mm-url-encode-multipart-form-data/

There's also an example of usage in eww-submit:

--8<---------------cut here---------------start------------->8---
         (let ((boundary (mml-compute-boundary '())))
           (let ((url-request-method "POST")
                 (url-request-extra-headers
                  (list (cons "Content-Type"
                              (concat "multipart/form-data; boundary="
                                      boundary))))
                 (url-request-data
                  (mm-url-encode-multipart-form-data values boundary)))
             (eww-browse-url (shr-expand-url
                              (cdr (assq :action form))
                              (plist-get eww-data :url)))))
--8<---------------cut here---------------end--------------->8---

I wonder why did you choose to create boundary "by hand" in your code
and not using mml-compute-boundary like here?

And why did you have to translate LF to CRLF?  Is it some specifics of
the API you were posting to or I'm just missing something?

---
via emacs-tangents mailing list 
(https://lists.gnu.org/mailman/listinfo/emacs-tangents)

Reply via email to