使用sdk调用http函数就这样,改回直接post就好了,用sdk调大概在10000ms左右就取消了
参考文档 https://help.aliyun.com/document_detail/460027.html?scm=20140722.H_460027._.ID_460027-OR_rec-V_1
Map map = new TreeMap<>(); map.put('readTimeout', 30 * 60 * 1000); map.put('connectTimeout', 30 * 60 * 1000); OkHttpClient okHttpClient = new OkHttpClientBuilder() .readTimeout(map) .connectTimeout(map) .buildOkHttpClient(); Request request = new Request.Builder() .url(aliOssProperties.getFcUrl()) .post(RequestBody.create(MediaType.parse('application/json'), json.toJSONString().getBytes(StandardCharsets.UTF_8))) .build();
赞0
踩0