diff --git a/README.md b/README.md index e99bc09fc..5332e2c7e 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,18 @@ Once suspended, execution of the fiber may be resumed with any value using Fiber public static function setInterval(callable $callable, int $interval) : void; /** - * @param array $options + * @param string $url + * @param array $options + * @return Promise when Promise resolve InternetRequestResult and when Promise reject Error + * @throws Throwable + * @phpstan-param array{method?: string, headers?: array, timeout?: int, body?: array} $options * * This method is used to fetch data from an url. */ - public static function fetch(string $url, array $options = [CURLOPT_RETURNTRANSFER => true]) : Promise; + public static function fetch(string $url, array $options = []) : Promise; /** + * @throws Throwable * This method is used to fetch data from an url. But it uses file_get_contents() instead of curl. */ public static function fetchJg(string $url) : Promise;