PHP code example of veasin / nx-http-curl

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

    

veasin / nx-http-curl example snippets


class app extends \nx\app{
	use \nx\parts\http\curl;
}
$app =new app;
$response =$app->http->patch($uri)
	->query(['CODE'=>404])
	->setLog(function($str){
		echo is_string($str) ?$str : json_encode($str, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), "\n";
	})
	->send();

var_dump($response);
var_dump($response->headers());
var_dump($response->body());