mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-11-24 02:08:48 +00:00
fix: 修复编译错误
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
5908fb17f9
commit
2b0a0d3a20
@ -142,16 +142,19 @@ public class HttpKit {
|
||||
*/
|
||||
@SneakyThrows
|
||||
public static String send(HttpInfo info) {
|
||||
@Cleanup
|
||||
HttpURLConnection conn = getHttpConnection(buildUrlWithQueryString(info), info.getMethod().name(), info.getHeader());
|
||||
conn.connect();
|
||||
if (StrKit.notBlank(info.getData())) {
|
||||
OutputStream out = conn.getOutputStream();
|
||||
out.write(info.getData().getBytes(CHARSET));
|
||||
out.flush();
|
||||
out.close();
|
||||
try {
|
||||
conn.connect();
|
||||
if (StrKit.notBlank(info.getData())) {
|
||||
OutputStream out = conn.getOutputStream();
|
||||
out.write(info.getData().getBytes(CHARSET));
|
||||
out.flush();
|
||||
out.close();
|
||||
}
|
||||
return readResponseString(conn);
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
}
|
||||
return readResponseString(conn);
|
||||
}
|
||||
|
||||
@Data
|
||||
|
Loading…
Reference in New Issue
Block a user