Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[VSC] Post form-data via VSC Rest-API Client

Next to the .http file in the same folder, place your .env for hostname and authorization and the file you want to upload.
The parameter name="file" stands for the key that the files should belong to.

### Post form-data
POST {{$dotenv hostname}}/my/endpoint HTTP/1.1
Authorization: Basic {{$dotenv auth_in_base64}}
Content-Type: multipart/form-data; boundary=boundary
Accept: */*

--boundary
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

< ./image.png

--boundary--

Leave a Reply

Your email address will not be published. Required fields are marked *