正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -19,6 +19,7 @@ import javax.net.ssl.X509TrustManager; | @@ -19,6 +19,7 @@ import javax.net.ssl.X509TrustManager; | ||
| 19 | import org.slf4j.Logger; | 19 | import org.slf4j.Logger; |
| 20 | import org.slf4j.LoggerFactory; | 20 | import org.slf4j.LoggerFactory; |
| 21 | import com.ruoyi.common.constant.Constants; | 21 | import com.ruoyi.common.constant.Constants; |
| 22 | +import com.ruoyi.common.utils.StringUtils; | ||
| 22 | 23 | ||
| 23 | /** | 24 | /** |
| 24 | * 通用http发送方法 | 25 | * 通用http发送方法 |
| @@ -55,7 +56,7 @@ public class HttpUtils | @@ -55,7 +56,7 @@ public class HttpUtils | ||
| 55 | BufferedReader in = null; | 56 | BufferedReader in = null; |
| 56 | try | 57 | try |
| 57 | { | 58 | { |
| 58 | - String urlNameString = url + "?" + param; | 59 | + String urlNameString = StringUtils.isNotBlank(param) ? url + "?" + param : url; |
| 59 | log.info("sendGet - {}", urlNameString); | 60 | log.info("sendGet - {}", urlNameString); |
| 60 | URL realUrl = new URL(urlNameString); | 61 | URL realUrl = new URL(urlNameString); |
| 61 | URLConnection connection = realUrl.openConnection(); | 62 | URLConnection connection = realUrl.openConnection(); |
-
请 注册 或 登录 后发表评论