Last active
October 26, 2015 23:58
-
-
Save kosinix/3096077936fed20c6258 to your computer and use it in GitHub Desktop.
HTTP multipart form sample request in plaintext and php. Make sure the boundary is correct. Notice that it must have the prefix "--" in the body but not in the header.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Content-type: multipart/form-data, boundary={$boundary} | |
Content-Length: {$contentLength} | |
--{$boundary} | |
content-disposition: form-data; name="field1" | |
{$field1} | |
--{$boundary} | |
content-disposition: form-data; name="field2" | |
{$field2} | |
--{$boundary} | |
content-disposition: form-data; name="userfile"; filename="{$filename}" | |
Content-Type: application/zip | |
{$binarydata} | |
--{$boundary} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment