我正在尝试使用命名凭据测试来自 Salesforce 的 API 标注。我已经设置了命名凭据和 OAuth 提供程序,并且能够快速测试命名凭据中的身份验证
我正在尝试编写 Apex 类以查看是否可以从 Rest API 检索记录我不是如何测试匿名执行此
public with sharing class RetrieveD365Data {
public RetrieveD365Data() {
Http http = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:Dev_D365/data/Customers');
req.setMethod('GET');
req.setTimeout(30000);
HttpResponse res = http.send(req);
System.debug('Response Body===========' + res.getBody());
}
}
但我得到 Line: 6, Column: 1 System.CalloutException: Unable to tunnel through proxy。代理返回 "HTTP/1.1 503 Service Unavailable" 。请帮我解决这个问题,因为我是 Salesforce 的新手。
我只是感到困惑,因为在设置命名凭据时身份验证成功(说身份验证状态)。但是使收到错误的标注不可用

