Skip to content

Instantly share code, notes, and snippets.

@zdne
Last active Mar 25, 2021
Embed
What would you like to do?
API Blueprint multipart request example. Raw HTTP source: http://chxo.com/be2/20050724_93bf.html.
# POST /path/to/script.php
+ Request (multipart/form-data, boundary=AaB03x)
+ Headers
Content-Length: $requestlen
+ Body
--AaB03x
content-disposition: form-data; name="field1"
$field1
--AaB03x
content-disposition: form-data; name="field2"
$field2
--AaB03x
content-disposition: form-data; name="userfile"; filename="$filename"
Content-Type: $mimetype
Content-Transfer-Encoding: binary
$binarydata
--AaB03x--
+ Response 201 (text/plain)
Ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment