我想从后端使用woocommerce API获取数据,但为此,我需要通过Consumer Key
和Consumer Secret
,我正在使用axios库,那么如何将这些参数传递给它们呢?如何在基于axios的网络调用中传递消费者密钥和消费者秘密参数?
我写的代码如下:
axios.get('https://LINK', {
headers: {
"consumerKey": "KEY",
"consumerSecret": "SECRET",
}
})
.then((res) => {
console.dir(res);
})
.catch(error => {
console.log(error);
});
}
你解决这个问题,与爱可信和woocommerce认证挣扎良好,几乎是完全一样的使用情况下,对WordPress的顶部和woocommerce反应程序,对于商店的互动部分。 – pushplaybang