Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VennDev committed Jul 9, 2023
1 parent b1e3894 commit 4485e7c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, mixed> $options
* @param string $url
* @param array<string|null, string|array> $options
* @return Promise when Promise resolve InternetRequestResult and when Promise reject Error
* @throws Throwable
* @phpstan-param array{method?: string, headers?: array<int, string>, timeout?: int, body?: array<string, string>} $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;
Expand Down

0 comments on commit 4485e7c

Please sign in to comment.