Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5c0b206f
authored
Jul 14, 2017
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
回调Http状态码异常时,记录响应消息;
parent
7b052d73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java
xxl-job-core/src/main/java/com/xxl/job/core/util/AdminApiUtil.java
View file @
5c0b206f
...
...
@@ -95,12 +95,13 @@ public class AdminApiUtil {
HttpResponse
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
if
(
null
!=
entity
)
{
String
responseMsg
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
if
(
response
.
getStatusLine
().
getStatusCode
()
!=
200
)
{
EntityUtils
.
consume
(
entity
);
return
new
ReturnT
<
String
>(
response
.
getStatusLine
().
getStatusCode
(),
"StatusCode Error."
);
return
new
ReturnT
<
String
>(
response
.
getStatusLine
().
getStatusCode
(),
"StatusCode(+"
+
response
.
getStatusLine
().
getStatusCode
()
+
") Error,response:"
+
responseMsg
);
}
String
responseMsg
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
EntityUtils
.
consume
(
entity
);
if
(
responseMsg
!=
null
&&
responseMsg
.
startsWith
(
"{"
))
{
ReturnT
<
String
>
result
=
JacksonUtil
.
readValue
(
responseMsg
,
ReturnT
.
class
);
...
...
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