使用Guzzle使用JSON发送POST请求

$client = new \GuzzleHttp\Client(); $url = 'api-url'; $request = $client->post($url, [ 'headers' => ['Content-Type' = > 'application/json'], 'json' => ['token' = > 'foo'] ]); return $request;
联系我们

邮箱 626512443@qq.com
电话 18611320371(微信)
QQ群 235681453

Copyright © 2015-2022

备案号:京ICP备15003423号-3