Skip to content

Commit

Permalink
add 增加协程
Browse files Browse the repository at this point in the history
  • Loading branch information
sinceleo committed Jul 14, 2023
1 parent 569009e commit ed73b21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tools/Guzzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function setHttpHandle(array $options = []): static
{
!empty($options['headers']) && $options['headers'] = array_merge($options['headers'], $this->headers);

// $options['handler'] = HandlerStack::create(new CoroutineHandler());
$options['handler'] = HandlerStack::create(new CoroutineHandler());

$this->client = \Hyperf\Support\make(Client::class, [$options]);

Expand All @@ -44,7 +44,6 @@ public function sendGet(string $url, array $params, array $headers = []): array
*/
public function sendPost(string $url, array $params, array $headers = []): array
{
var_dump(Json::encode($params));
$result = $this->client->post($url, ['body' => Json::encode($params)]);

return $this->getResult($result);
Expand Down

0 comments on commit ed73b21

Please sign in to comment.