Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
0b14155a
Commit
0b14155a
authored
Oct 09, 2021
by
RuoYi
Browse files
增加 sendGet 无参判断
parent
f1fed762
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
View file @
0b14155a
...
@@ -19,6 +19,7 @@ import javax.net.ssl.X509TrustManager;
...
@@ -19,6 +19,7 @@ import javax.net.ssl.X509TrustManager;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.utils.StringUtils
;
/**
/**
* 通用http发送方法
* 通用http发送方法
...
@@ -55,7 +56,7 @@ public class HttpUtils
...
@@ -55,7 +56,7 @@ public class HttpUtils
BufferedReader
in
=
null
;
BufferedReader
in
=
null
;
try
try
{
{
String
urlNameString
=
url
+
"?"
+
param
;
String
urlNameString
=
StringUtils
.
isNotBlank
(
param
)
?
url
+
"?"
+
param
:
url
;
log
.
info
(
"sendGet - {}"
,
urlNameString
);
log
.
info
(
"sendGet - {}"
,
urlNameString
);
URL
realUrl
=
new
URL
(
urlNameString
);
URL
realUrl
=
new
URL
(
urlNameString
);
URLConnection
connection
=
realUrl
.
openConnection
();
URLConnection
connection
=
realUrl
.
openConnection
();
...
...
Write
Preview
Supports
Markdown
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