PHP code example of mezon / rest-exception
1. Go to this page and download the library: Download mezon/rest-exception 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/ */
mezon / rest-exception example snippets
throw(new \Mezon\Rest\Exception(
"", // message of the exception, like in the standard Exception class
-1, // code of the exception, like in the standard Exception class
200, // HTTP code of the request
"<p>Warning!" // HTTP request body
));