简体   繁体   English

即使提供了Pingdom凭据,

[英]Pingdom Credential Missing Even If Provided

I'm writing a node.js application that makes a get request to pingdom; 我正在编写一个向pingdom发出get请求的node.js应用程序; but keep getting "user credential missing error" even tho I tried to put that everywhere. 但即使我尝试将其放置在任何地方,也要不断收到“用户凭证丢失错误”。 Please see code below. 请参见下面的代码。

function get_checks() {
    var options = {
        "hostname" : "api.pingdom.com",
        "path" : "/api/2.0/checks?"+"userpwd=user@example.com"+":"+"password",
        "method" : "GET",
        "headers" : {
            "userpwd" : "user@example.com"+":"+"password",
            "App-Key" : "key"
        },
        "userpwd" : "user@example.com"+":"+"password"
    };

    var req = https.request(options, function(response){
        response.on('data', function(response_data) {
            console.log("Response: " + response_data);
        });
    });

    req.end();
}

Just gonna answer this myself so it doesn't hang as an unanswered question... 只要自己回答即可,这样就不会悬而未决...

pingdom uses http basic authentication so it has to be in authentication header pingdom使用http基本身份验证,因此它必须位于身份验证标头中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 身份验证错误捕获中缺少 firebase 凭据 - firebase credential missing in auth error catch Pingdom页面负载测试 - Pingdom page load test 即使AngularJS和PHP的凭据不正确,登录仍然会指示 - Login still directs even if incorrect credential with AngularJS and PHP Firebase Admin SDK-错误:提供了用于初始化App()的凭据实现…无法获取有效的Google OAuth2访问令牌 - Firebase Admin SDK - Error: Credential implementation provided to initializeApp() … failed to fetch a valid Google OAuth2 access token 为什么即使未提供令牌,我的测试也会收到状态 200? - why is my test receiving status 200 even though token is not provided? 即使在提供标题后,概念 js SDK 也会要求标题 - Notion js SDK asks for title even after title is provided 即使使用现有的 getOptionSelect 参数,提供给 Material UI 自动完成的值也不正确 - Value provided to Material UI autocomplete is incorrect even with existing getOptionSelect param TypeError [CLIENT-MISSING-INTENTS]:必须为客户端提供有效的意图 - TypeError [CLIENT-MISSING-INTENTS]: Valid intents must be provided for the Client yargs 说通过 JSON 提供的嵌套 arguments “缺失” - yargs says nested arguments provided via JSON are “missing” GraphQL:为构建架构提供的类型之一缺少名称 - GraphQL: One of the provided types for building the Schema is missing a name
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM