$client = new Client();
$url = 'api-url';
$request = $client->post($url, [
'headers' => [ 'Content-Type' => 'application/json' ],
'json' => ['token' => 'foo']
]);
return $request;
我也得到502 Bad Gateway
和资源解释为文档,但与MIME类型application/JSONUzing狂饮发送POST请求qith JSON
我需要做一些JSON POST请求转移。如何在Guzzle和Laravel中做到这一点?
@KiraArik其中狂饮的版本,您使用的? –
这工作!非常感谢!!! – Kira