Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Easy Http SDK
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Back End
Easy Http SDK
Commits
f649e58e
Commit
f649e58e
authored
Feb 21, 2023
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化一些单词描述
parent
6741f885
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Application.php
src/Application.php
+2
-2
Option.php
src/Option.php
+5
-4
No files found.
src/Application.php
View file @
f649e58e
...
...
@@ -200,7 +200,7 @@ class Application implements ClientInterface
throw
new
TimeOutExcetpion
(
$request
,
$exception
);
}
catch
(
GuzzleException
$exception
)
{
if
(
$this
->
logger
)
{
$this
->
logger
->
error
(
"sdk e
t
rror, bad client!"
);
$this
->
logger
->
error
(
"sdk error, bad client!"
);
}
if
(
!
(
$request
instanceof
SdkRequest
))
{
throw
new
ApplicationException
(
$exception
->
getMessage
(),
null
,
[],
$exception
);
...
...
@@ -240,7 +240,7 @@ class Application implements ClientInterface
if
(
$this
->
logger
)
{
$this
->
logger
->
error
(
"sdk error, paypal service fail"
,
$context
);
}
throw
new
SdkException
(
"SDK Upstram Failed"
,
$request
,
$response
,
[]);
throw
new
SdkException
(
"SDK Upstr
e
am Failed"
,
$request
,
$response
,
[]);
}
if
(
in_array
(
$response
->
getStatusCode
(),
[
404
,
405
]))
{
...
...
src/Option.php
View file @
f649e58e
...
...
@@ -3,12 +3,13 @@ declare(strict_types=1);
namespace
Jiwei\EasyHttpSdk
;
use
Closure
;
use
Jiwei\EasyHttpSdk\Policy\DefaultErrorHandlingPolicy
;
use
Jiwei\EasyHttpSdk\Policy\HandlingPolicyInterface
;
abstract
class
Option
{
const
ENDPO
NI
T_HOSTS
=
[
const
ENDPO
IN
T_HOSTS
=
[
'local'
=>
''
,
'development'
=>
''
,
'production'
=>
''
...
...
@@ -28,9 +29,9 @@ abstract class Option
private
$debug
=
false
;
/**
* @return
\
Closure
* @return Closure
*/
abstract
public
function
authorization
()
:
\
Closure
;
abstract
public
function
authorization
()
:
Closure
;
/**
* 错误处理策略
...
...
@@ -105,7 +106,7 @@ abstract class Option
public
function
getBaseUrl
()
:
string
{
return
static
::
ENDPO
NI
T_HOSTS
[
$this
->
getStage
()]
??
""
;
return
static
::
ENDPO
IN
T_HOSTS
[
$this
->
getStage
()]
??
""
;
}
/**
...
...
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