PHP code example of farizhuzairi / jet-request

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

    

farizhuzairi / jet-request example snippets


$response = Request::request();
$response->successful();
$response->statusCode();
$response->message();
$response->getResults();

$response = Request::request(
    [
        'name' => 'Bob',
        'email' => '[email protected]',
        'password' => '12345678',
    ],
    'POST',
    function ($request) {
        $request->url('user/store')
        ->header('Authorization Bearer', 'xxx');
    }
);