Получить запрос в Guzzle - PullRequest
       42

Получить запрос в Guzzle

0 голосов
/ 30 ноября 2018

Я новичок в 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);
}

Я надеюсь, что кто-то может мне помочь!

...