Good evening! Dear members of the forum, I write through a translator, I do not know English at all, I write from the distant Northern region of Yakutia. I ask you to understand and forgive me. In the harsh winter conditions, I'm trying to do programming.
I edited the required array value in the application / config directory in the config.php configuration file:
PHP Code:
$config['composer_autoload'] = TRUE;
The vendor directory was created successfully. I downloaded the library through the Composer. I have a question if I called the library correctly:
PHP Code:
class Myclass extends CI_Controller {
public function __construct()
{
parent::__construct();
}
// --------------------------------------------------------------------
public function codeigniter()
{
$client = new GuzzleHttp\Client();
$api_url = 'https://api.github.com/users/codeigniter4';
$req = $this->client->request('GET', $api_url);
if ($req->getStatusCode() === 200)
{
echo $res->getBody();
}
}
}
Thank you for your answers, have a nice day)))