Last active
February 9, 2016 19:46
-
-
Save mbn18/fff2592ec38e5d9798d0 to your computer and use it in GitHub Desktop.
Is PUT working well with ZF2 & multipart/form-data?
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
Note that that test[] is squashed | |
$ http --form -f PUT http://127.0.0.1/api/post/ZDqojJqaYumqxJKzXUvB7Y author='author' content='content' title='title' test[]='ffff' test[]='zzzz' file@~/Pictures/Screenshot\ from\ 2015-09-13\ 17-12-02.png | |
HTTP/1.1 200 OK | |
Connection: keep-alive | |
Content-Encoding: gzip | |
Content-Type: text/html; charset=UTF-8 | |
Date: Tue, 09 Feb 2016 19:42:48 GMT | |
Server: nginx/1.9.7 | |
Transfer-Encoding: chunked | |
X-Powered-By: PHP/7.0.2 | |
object(stdClass)#531 (5) { | |
["author"]=> | |
string(6) "author" | |
["content"]=> | |
string(7) "content" | |
["title"]=> | |
string(5) "title" | |
["test[]"]=> | |
string(4) "zzzz" | |
["file"]=> | |
array(5) { | |
["error"]=> | |
int(0) | |
["name"]=> | |
string(39) "Screenshot from 2015-09-13 17-12-02.png" | |
["type"]=> | |
string(9) "image/png" | |
["tmp_name"]=> | |
string(14) "/tmp/zfcmuLINJ" | |
["size"]=> | |
int(8865) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment