【发布时间】:2017-11-15 07:26:04
【问题描述】:
我有一个 laravel 5 应用程序,我正在以这种方式发出帖子请求
$client = new Client(); //GuzzleHttp\Client
$result = $client->post('http://example.com/http_hook/meteor.php', [
'form_params' => [
'phone' => '380720011000'
]
]);
我正在以这种方式接收发布请求
<?php
$post = file_get_contents('php://input');
$phone = $post['phone'];
我如何使用来自 laravel 的帖子数据?接收代码不起作用,也不会引发错误。
【问题讨论】:
-
您能否告诉我您在发出帖子请求后得到的回复?
-
你想做什么?你的 Guzzle 客户端没有被解雇...