0
Azure REST 끝점을 다시 호출 할 Node.js 콘솔 앱을 빌드하려고합니다. 특히, 끝점에서 DELETE 동작을 사용하고 싶습니다. Fiddler에서 요청을 성공적으로 설정할 수 있습니다. 그러나 Node에서 호출하라는 요청을받을 수 없습니다. 나는 어디 시도하고는 HTTPS 모듈을 사용하고 다음과 같은 : 내가 잘못 뭐하는 거지Node.js - HTTPS 모듈을 통해 DELETE 실행
{
[Error: getaddrinfo ENOTFOUND https://test-service.search.windows.net https://test-service.search.windows.net:443]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'https://test-service.search.windows.net',
host: 'https://test-service.search.windows.net',
port: 443
}
:이 프로그램을 실행할 때
console.log('deleting search index.');
var options = {
host: 'https://test-service.search.windows.net',
path: '/indexes/test?api-version=2015-02-28',
port: 443,
method: 'DELETE',
headers: {
'api-key': '[Hidden]'
}
};
var req = https.request(options, (res) => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('data', (d) => {});
});
req.end();
req.on('error', (e) => {
console.error(e);
});
, 나는 말한다 오류가? 이것은 나에게 맞는 것 같습니다. 당신이 이미 이미 프로토콜을 알고 https
모듈을 사용하는 경우
도현! 당신이 그것을 말하면서 총체적인 의미를 갖습니다. 이것을 지적 해 주셔서 감사합니다. –