【发布时间】:2017-12-17 01:21:38
【问题描述】:
)
我对 Laravel 5.2 和 Guzzle 6.3 有疑问
这是我发送 POST 到 URL 的代码
$client = new Client();
$result = $client->post('https://marketing.webbera.co.uk/form/2', [
'form_params' => [
'mauticform_label_welcomeemailwebbera_email' => 'test@test.com',
'mauticform_label_welcomeemailwebbera_ime' =>'Secret'
]
]);
$result = $client->send($result);
这是我遇到的错误
Argument 1 passed to GuzzleHttp\Client::send() must implement interface Psr\Http\Message\RequestInterface, instance of GuzzleHttp\Psr7\Response given, called in /app/Http/Controllers/Registration.php on line 63 and defined
这是第 63 行 $result = $client->send($result);
我不知道有什么问题,所以欢迎任何提示;)
【问题讨论】:
-
$result = $client->send($result);是干什么用的?您已经在进行 POST。