|
|
@ -262,16 +262,6 @@ public class SyncController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject redirectAliApi(HttpServletRequest request, String uri) {
|
|
|
|
private JSONObject redirectAliApi(HttpServletRequest request, String uri) {
|
|
|
|
// 创建HTTP头,可以从原始请求中复制一些头信息
|
|
|
|
|
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
|
|
|
|
|
// 例如,复制Content-Type头(如果需要)
|
|
|
|
|
|
|
|
String contentType = request.getContentType() != null ? request.getContentType().toString() : "application/json";
|
|
|
|
|
|
|
|
headers.setContentType(MediaType.parseMediaType(contentType));
|
|
|
|
|
|
|
|
// 如果需要,还可以添加其他头信息,如Authorization等
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 创建HttpEntity,包含头和可能的请求体(这里假设是GET请求,所以没有请求体)
|
|
|
|
|
|
|
|
HttpEntity<String> entity = new HttpEntity<>(headers);
|
|
|
|
|
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
|
|
|
|
|
String queryString = request.getQueryString();
|
|
|
|
String queryString = request.getQueryString();
|
|
|
|
Map<String, Object> queryMap = null;
|
|
|
|
Map<String, Object> queryMap = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|