From 4485e7ceecf50e535866f6d56bd8aaebe88f73bb Mon Sep 17 00:00:00 2001 From: VennV <111500380+VennDev@users.noreply.github.com> Date: Sun, 9 Jul 2023 23:27:49 +0700 Subject: [PATCH] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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;