【发布时间】:2014-12-08 10:18:24
【问题描述】:
我已经使用 android java 通过在 post 实体中设置它来发送JSON 数据,如下所示:
HttpPost httpPostRequest = new HttpPost(URLs.AddRecipe);
StringEntity se = new StringEntity(jsonObject.toString());
httpPostRequest.setEntity(se);
如何在我使用 Slim framework 的 php 中接收此 json 数据?
我试过这个:
$app->post('/recipe/insert/', 'authenticate', function() use ($app) {
$response = array();
$json = $app->request()->post();
});
【问题讨论】:
标签: php android json httprequest slim