PHP file_get_contents('php:// input');截断JSON POST数据

时间:2013-07-08 15:53:24

标签: php json post file-get-contents

以下POST将从file_get_contents('php:// input')返回'{“name”:“TheCustomer”} ;

curl -i http://localhost/api/api/application_create -d '{"name": "TheCustomer"}' -H 'X-API-KEY: {MY_USER_KEY}' -H "Content-Type: application/json" -v -u {MYUSER:MYPASSWORD} -X POST

此POST将返回'{“name”:来自file_get_contents的'('php:// input');

curl -i http://localhost/api/api/application_create -d '{"name": "The Customer"}' -H 'X-API-KEY: {MY_USER_KEY}' -H "Content-Type: application/json" -v -u {MYUSER:MYPASSWORD} -X POST

任何触发截断的想法?

0 个答案:

没有答案