PHP code example of oteixido / yii2-rest-backend
1. Go to this page and download the library: Download oteixido/yii2-rest-backend library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oteixido / yii2-rest-backend example snippets
return [
//....
'components' => [
'httpClient' => [
'class' => '\oteixido\rest\http\HttpClient',
'baseUrl' => 'https://localhost.localdomain/api/v1',
'username' => 'username', // Default no username
'password' => 'password', // Default no password
'timeout' => 5, // Default 10 seconds
'sslVerify' => false, // Default true
],
],
];