veasin/nx-http

There is no license information available for the latest version (0.0.1) of this package.

http for nx

0.0.1 2025-07-08 06:18 UTC

This package is auto-updated.

Last update: 2025-07-08 06:21:00 UTC


README

http for nx

composer require urn2/nx-http

class app extends \nx\app{
	use \nx\parts\http\stream;
}
$app =new app;
$response =$app->http->patch($uri)
	//->options(['method' => 'get', 'timeout' => 0.5])
	->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());