PHP code example of hanaboso / rest-bundle

1. Go to this page and download the library: Download hanaboso/rest-bundle 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/ */

    

hanaboso / rest-bundle example snippets


rest:
    routes:
        ^/: ['json', 'xml']
    decoders:
        json: 'rest.decoder.json'
        xml: 'rest.decoder.xml'
    cors:
        ^/:
            origin: ['*']
            methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
            headers: ['Content-Type']
            credentials: TRUE
    security:
        ^/:
            X-Frame-Options: 'sameorigin'
            X-XSS-Protection: '1; mode=block'
            X-Content-Type-Options: 'nosniff'
            Content-Security-Policy: "default-src * data: blob: 'unsafe-inline' 'unsafe-eval'"
            Strict-Transport-Security: 'max-age=31536000;