PHP code example of pumasoft / puma-api
1. Go to this page and download the library: Download pumasoft/puma-api 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/ */
pumasoft / puma-api example snippets
const PUMA_API_LOG_EXCEPTIONS=true; // will php.log the exceptions, by default will not
const PUMA_API_SEND_EXCEPTIONS_IN_RESPONSE=true; // will send exceptions in JSON response instead of php.log
const PUMA_API_DO_NOT_VALIDATE_SSL = true; // will not send secure curl requests
use PumaAPI\Controller\API;
$Puma = new API(/*{{MANIFEST_DIRECTORY}}*/); // manifest directory by default is ROOT/__manifest/
$cert = $Puma->getCertificate(); // gets certified request formatted according to certificate file