我正在尝试使用以下代码调用终点,但它总是返回以下错误。
你能说出可能出现的错误吗?
HttpRequest req = new HttpRequest();
req.setEndpoint('https://ntrs-com.apibasicauth.btglss.net/bitglassapi/data/v1/soql');
req.setMethod('POST');
//req.setHeader('Authorization', '');
req.setHeader('Content-Type', 'application/json');
req.setBody('{"responseformat":"json","query":"select Id from Account","offset":"1","limit":"10"}');
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('---Body----'+res.getBody());
错误说:
行:8,列:1 System.CalloutException: java.security.cert.CertificateException:没有主题备用DNS 名称匹配ntrs-com.apibasicauth.btglss.net找到。