src/Request/Http.php
/**
	 * Does current request accept json
	 *
	 * @return bool
	 */
Does current request accept json
@return bool
Does current request accept json @return bool
public static function acceptJSON(): bool
	{
		if (!isset($_SERVER['HTTP_ACCEPT'])) {
			return false;
		}
		if (str_contains($_SERVER['HTTP_ACCEPT'], 'application/json')) {
			return true;
		}
		return false;
	}
public static function acceptJSON ( ) : bool { if ( ! isset ( $ _SERVER [ 'HTTP_ACCEPT' ] ) ) { return false ; } if ( str_contains ( $ _SERVER [ 'HTTP_ACCEPT' ] , 'application/json' ) ) { return true ; } return false ; }
Does current request accept json
 @return bool
Does current request accept json @return bool