zweifisch / ob-http

make http request within org-mode babel
GNU General Public License v3.0
256 stars 30 forks source link

Sending multipart form data #44

Open olymk2 opened 5 years ago

olymk2 commented 5 years ago

I am trying to submit a multipart upload with the following body, however the webserver seems to receive no GET POST or FILES content is that actually supported or am I doing something wrong below.

POST http://localhost/api/upload/ HTTP/1.1
Authorization: token 9efb4ff4ea724264f42b2938e9a9115f27c9a82f
Accept: */*
Content-Type: multipart/form-data; boundary=testboundary

--testboundary
Content-Disposition: form-data; name="data"
{
  "data": "test",
  "organisation": "test",
  "email_address": "test@test.com",
  "contact_number": "01758000000",
  "last_name": "test",
  "first_name": "test"
}
--testboundary
Content-Disposition: form-data; name="file"; filename="test.txt"

test
--testboundary--