PHP code example of thruster / http-response
1. Go to this page and download the library: Download thruster/http-response 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/ */
thruster / http-response example snippets
use Thruster\Component\HttpResponse\ResponseBuilder;
$response = ResponseBuilder::init($response)->withJsonBody($data);
$response = ResponseBuilder::init($response)->withJsonBody($data, 'application/vnd.thruster+json');