Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
995f0cfa
Commit
995f0cfa
authored
Sep 12, 2018
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
de0e105f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
FpfHttpClient.php
classes/fpf/http/FpfHttpClient.php
+1
-1
SwooleHttpClient.php
classes/fpf/http/SwooleHttpClient.php
+4
-4
No files found.
classes/fpf/http/FpfHttpClient.php
View file @
995f0cfa
...
...
@@ -15,7 +15,7 @@ class FpfHttpClient
public
function
__construct
(
$config
=
[])
{
if
(
defined
(
'IS_SWOOLE_SERVICE'
)
&&
IS_SWOOLE_SERVICE
===
true
)
{
$this
->
http_client
=
new
SwooleHttpClient
();
$this
->
http_client
=
new
SwooleHttpClient
(
$config
);
}
else
{
$this
->
http_client
=
new
CurlHttpClient
(
$config
);
}
...
...
classes/fpf/http/SwooleHttpClient.php
View file @
995f0cfa
...
...
@@ -49,11 +49,11 @@ class SwooleHttpClient
const
METHOD_POST
=
'POST'
;
const
METHOD_GET
=
'GET'
;
public
function
__construct
()
public
function
__construct
(
$config
=
[]
)
{
$
config
=
\Yii
::
$app
->
fpf
->
loadConfig
(
'http_options'
);
$this
->
connect_timeout_ms
=
$config
[
'connect_timeout'
]
??
10
;
$this
->
timeout_ms
=
$config
[
'timeout_ms'
]
??
100
;
$
http_option
=
\Yii
::
$app
->
fpf
->
loadConfig
(
'http_options'
);
$this
->
connect_timeout_ms
=
isset
(
$config
[
'connect_timeout'
])
?
$config
[
'connect_timeout'
]
:
(
$http_option
[
'connect_timeout'
]
??
10
)
;
$this
->
timeout_ms
=
isset
(
$config
[
'timeout_ms'
])
?
$config
[
'timeout_ms'
]
:
(
$http_option
[
'timeout_ms'
]
??
100
)
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment