PHP code example of enumit / curl

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

    

enumit / curl example snippets


$curlHelper = new \enumit\curl\CurlHelper();

$res = $curlHelper->setUrl('https://api.mydomain.com/order')
                ->setRequestMethod('PUT')
                ->setHeader(['Content-Type: application/json'])
                ->setQueryData(['order_number'=>'123456', 'amount'=>'154.33'])
                ->send();