运行此代码时出现错误 404。它使用 Flipkart-affiliate-client npm 包作为 Flipkart api ( https://github.com/zivost/flipkart-affiliate-client )
var flipkart = require('flipkart-affiliate-client');
const express = require('express');
const router = express.Router();
var client = flipkart.createClient({
FkAffId: 'fkid',
FkAffToken: 'token',
responseType: 'json'
});
client.keywordSearch({
query: "iphone",
resultCount: "1"
}, function(err, results) {
if (err) {
console.log(err + "!!!!!!!!");
} else {
console.log(results);
}
});
aaffiliate id 和 token 是正确的。