我是Guzzle的新手,我正尝试从我的api获取请求
这是我现在拥有的:
$client = new Client(['base_uri' => 'https://api.harvestapp.com']);
$request = $client->request('GET', '/v2/time_entries', [
'headers' => [
'Authorization' => 'Bearer bearer_key',
'Harvest-Account-ID' => 'account_id_key']
]);
$request = json_decode($request);
return new JsonResponse($request);
}
我希望有人能帮助我!