Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PRMS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengfunan
PRMS
Commits
de2beda0
Commit
de2beda0
authored
Nov 18, 2021
by
shaochangbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http post 请求添加sid参数
parent
e3ad9f86
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
HttpTask.java
...ain/java/com/yingxin/prms/service/asyncTask/HttpTask.java
+5
-0
SendHttpUtil.java
src/main/java/com/yingxin/prms/utils/SendHttpUtil.java
+4
-1
No files found.
src/main/java/com/yingxin/prms/service/asyncTask/HttpTask.java
View file @
de2beda0
...
...
@@ -118,6 +118,9 @@ public class HttpTask extends BasicTask{
case
"云从"
:
flag
=
checkCode
(
map
);
break
;
case
"签名验签接入服务"
:
flag
=
checkStatusCode
(
map
);
break
;
default
:
flag
=
checkStatusCode
(
map
);
}
...
...
@@ -139,6 +142,8 @@ public class HttpTask extends BasicTask{
}
return
false
;
}
private
boolean
checkCode
(
Map
<
String
,
String
>
map
)
{
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
.
get
(
"body"
));
if
(
map
.
containsKey
(
"body"
)&&
map
.
containsKey
(
"body"
)){
...
...
src/main/java/com/yingxin/prms/utils/SendHttpUtil.java
View file @
de2beda0
...
...
@@ -65,7 +65,6 @@ public class SendHttpUtil {
// 将上面的配置信息 运用到这个Get请求里
httpGet
.
setConfig
(
requestConfig
);
// 由客户端执行(发送)Get请求
response
=
httpClient
.
execute
(
httpGet
);
...
...
@@ -119,6 +118,10 @@ public class SendHttpUtil {
httpPost
.
setEntity
(
entity
);
httpPost
.
setHeader
(
"Content-Type"
,
"application/json;charset=utf8"
);
if
(
httpPost
.
getURI
().
toString
().
indexOf
(
"192.168.56.48"
)>=
0
){
System
.
out
.
println
(
"===================== 查看服务URL ======================"
);
httpPost
.
setHeader
(
"sid"
,
"yunwei123"
);
}
// 响应模型
CloseableHttpResponse
response
=
null
;
...
...
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