public static function generateFromEnvironment() {
		global $argc, $argv;
		
		$stdin = defined('STDIN') ? STDIN : fopen('php://stdin', 'r');
		$data = stream_get_meta_data($stdin);
		$input = null;
		if( empty($data['seekable']) ) {
			$input = trim(stream_get_contents($stdin));
		}
		
		/*
		$path = '/';
		if( $argc > 1 && $argv[1][0] !== '-' ) {
			$path = $argv[1];
			$parameters = array_slice($argv, 2);
		} else {
			$parameters = array_slice($argv, 1);
		}
		*/
		$path = $argv[1];
		$parameters = array_slice($argv, 2);
		
		$request = new static($path, $parameters, $input);
// 		$request->setContent($input);
		return $request;
	}