2023-06-27
This commit is contained in:
@@ -132,6 +132,9 @@
|
|||||||
'UrlStr': url,
|
'UrlStr': url,
|
||||||
'PCUrl': '<%=PCUrl%>',
|
'PCUrl': '<%=PCUrl%>',
|
||||||
},
|
},
|
||||||
|
headers: {
|
||||||
|
'token': '<%=UserId%>'
|
||||||
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
async: false,
|
async: false,
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ namespace WebAPI.Controllers
|
|||||||
HttpClient _httpClient = new HttpClient();
|
HttpClient _httpClient = new HttpClient();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
|
// System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
|
||||||
// 发送 GET 请求以获取文件内容
|
// 发送 GET 请求以获取文件内容
|
||||||
var response = await _httpClient.GetAsync(toDoItem.UrlStr);
|
var response = await _httpClient.GetAsync(toDoItem.UrlStr);
|
||||||
response.EnsureSuccessStatusCode();
|
response.EnsureSuccessStatusCode();
|
||||||
|
|||||||
Reference in New Issue
Block a user