细节优化

cow解析失败时返回异常
This commit is contained in:
qaiu
2023-04-22 12:46:42 +08:00
parent 5d366f43ae
commit 46a4cd753d
2 changed files with 2 additions and 51 deletions

View File

@@ -3,12 +3,10 @@ package cn.qaiu.lz.common.util;
import cn.qaiu.vx.core.util.CastUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.vertx.core.http.HttpClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup;
import java.io.IOException;
import java.util.Map;
/**
@@ -40,7 +38,7 @@ public class CowTool {
}
}
*/
public static String parse(String fullUrl) throws IOException {
public static String parse(String fullUrl) throws Exception {
var uniqueUrl = fullUrl.substring(fullUrl.lastIndexOf('/') + 1);
var baseUrl = "https://cowtransfer.com/core/api/transfer/share";
var result = Jsoup
@@ -73,7 +71,7 @@ public class CowTool {
}
}
log.info("Cow parse field------------->end");
return null;
throw new Exception("Cow解析失败");
}

View File

@@ -1,47 +0,0 @@
###
http://127.0.0.1:8088/real/test
###
POST http://127.0.0.1:8088/real/serverApi/login
Content-Type: application/x-www-form-urlencoded
username=sa&password=sinoreal
###
POST http://47.114.185.111:8070/real/serverApi/login
Content-Type: application/x-www-form-urlencoded
username=sa&password=sinoreal
###
http://127.0.0.1:8088/real/serverApi/hello2/ok2
token: 11f1a7ad9dd907bf1fa6a9e79277d053
###
http://127.0.0.1:8088/real/test2
###
POST http://127.0.0.1:8088/real/serverApi/getConnections
token: 370ba165d3164049b7704e8b3d595930
###
POST http://127.0.0.1:8085/real/serverApi/getConnectionInfo
token: 21f99c6080074ae79cda2e988ab2bdb8
###
http://127.0.0.1:7070/demo/foo
###
http://127.0.0.1:8085/api/foo
###
http://127.0.0.1:8085/real/serverApi/thread-test
token: c1b89b3193bd4498be77b6e782e0df38
###
http://127.0.0.1:8085/
Accept: application/json