记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
8104eb9b
Commit
8104eb9b
authored
Jul 07, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP GET请求调整;
parent
6aa83d18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
HttpUtil.java
...c/main/java/com/liquidnet/commons/lang/util/HttpUtil.java
+6
-6
No files found.
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/HttpUtil.java
View file @
8104eb9b
...
...
@@ -333,20 +333,20 @@ public class HttpUtil {
HttpEntity
<
Object
>
httpEntity
=
new
HttpEntity
(
httpHeaders
);
MultiValueMap
<
String
,
String
>
multiValueMap
=
(
MultiValueMap
<
String
,
String
>)
params
;
String
paramStr
=
""
;
if
(
multiValueMap
.
size
()>
0
){
if
(
url
.
indexOf
(
"?"
)<
0
)
{
if
(
multiValueMap
.
size
()>
0
)
{
if
(!
url
.
contains
(
"?"
))
{
// 提交方式:表单、json
for
(
String
key:
multiValueMap
.
keySet
())
{
for
(
String
key
:
multiValueMap
.
keySet
())
{
try
{
String
value
=
multiValueMap
.
get
(
key
).
get
(
0
)
.
toString
()
;
paramStr
=
paramStr
.
concat
(
"&"
+
key
+
"="
+
value
);
String
value
=
multiValueMap
.
get
(
key
).
get
(
0
);
paramStr
=
paramStr
.
concat
(
"&"
+
key
+
"="
+
value
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
url
=
url
.
concat
(
"?"
).
concat
(
paramStr
);
System
.
out
.
println
(
"url=="
+
url
);
//
System.out.println("url=="+url);
}
ResponseEntity
<
String
>
response
=
restTemplate
.
exchange
(
url
,
method
,
httpEntity
,
String
.
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