request('GET', 'https://api.example.com/ogboot/v1/oglives', [ 'headers' => [ 'accept' => 'application/json', ], ]); } catch (TransportExceptionInterface $e) { return new JsonResponse( data: 'An error occurred', status: Response::HTTP_INTERNAL_SERVER_ERROR); } $data = json_decode($response->getContent(), true); return new JsonResponse( data: $data, status: Response::HTTP_OK); } }