我創建了哈皮一個簡單的API,有我可以張貼到的路由,它看起來像這樣: server.route({
method: "POST",
path: "/hello",
handler: function(request, reply) {
// It doesn't ever get to here
return reply({hello: reque
我使用獲取API從其他API的數據,這是我的代碼: var result = fetch(ip, {
method: 'get',
}).then(response => response.json())
.then(data => {
country = data.country_name;
let lat = data.latitude
我想用fetch寫一個簡單的基本身份驗證,但我一直收到401錯誤。 let base64 = require('base-64');
let url = 'http://eu.httpbin.org/basic-auth/user/passwd';
let username = 'user';
let password = 'passwd';
let headers = new Hea