Skip to content

Commit

Permalink
[#] 优化网络请求参数
Browse files Browse the repository at this point in the history
  • Loading branch information
WangNingkai committed Mar 17, 2021
1 parent f46d345 commit 5abac5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Service/GraphClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function execute(): ?GraphResponse
{
try {
$query = $this->graph->createRequest($this->method, $this->query)
->setTimeout(3)
->setTimeout(5)
->addHeaders($this->headers)
->attachBody($this->body);
$resp = $query->execute();
Expand Down
2 changes: 1 addition & 1 deletion app/Service/GraphRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function execute()
$curl = new Curl();
$curl->setUserAgent('ISV|OLAINDEX|OLAINDEX/6.0');
$curl->setHeaders($this->headers);
$curl->setRetry(1);
$curl->setRetry(2);
$curl->setConnectTimeout(5);
$curl->setTimeout((int)$this->timeout);
$curl->setUrl($this->baseUrl . '/' . $this->_getRequestUrl());
Expand Down

0 comments on commit 5abac5e

Please sign in to comment.