1. Go to this page and download the library: Download pickmap/service-request 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/ */
class sample {
use ServiceRequest;
public function aMethod()
{
self::requestPost('https:://service.com/list');
}
}
//If $refreshToken is equal to true, the token will be refreshed regardless of the cache
self::getToken($refreshToken);
self::requestToKeyCloak();
/*
Authorization is set in all tokens, but with this method, it is overwritten by the third parameter of post and get methods.
*/
self::HeadersProcess($newHeader);
self::requestPost(string $url,array $data = [],$headers = []);
self::requestGet(string $url,array $data = [],$headers = []);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.