Sign in | Sign up

Having trouble getting any response for exercise endpoint with fetch api

Tagged:

Currently contains 7 posts

Avatar

February 22, 2019 05:16

keurig

let post = {
method: “POST”,
headers: {
“x-app-id”:"",
“x-app-key”:"",
“x-remote-user-id”:“0”,
“Content-Type”:“application/json”
},
body: {
“query”:“ran 4 miles”
}
};

fetch(“https://trackapi.nutritionix.com/v2/natural/exercise”, post)
.then(function(response){
return response.json;
})
.then(function(data) {
console.log(data);
})

I removed the key and id from the code, but this just returns a 400 bad request. I am so confused anyone can help?

Avatar

July 01, 2020 23:29

ggarrison

Having the same issue… Did you you figure it out? Does it have something to do w “x-user-jwt” auth? I have the app-id & key but not a jwt/bearer token.

Avatar

November 21, 2020 23:28

jzeng81

I have the same issue… can someone give an example?

Avatar

February 15, 2021 16:20

ssi-victoriano-eco

Is this still an issue? Can you try whitelisting your IP address from the “Referrer Filters”.

Avatar

April 22, 2021 22:58

walikhan

I have the same issue. I am not sure what to do

Avatar

April 24, 2021 20:16

gamepinupcasino

Игровые автоматы [url=https://pin-up777.ru/]Пин Ап[/url] Казино имеют официальную лицензию и стабильно выплачивают игрокам их выигрыши!

Avatar

April 24, 2021 20:16

gamepinupcasino

Игровые автоматы [url=https://pin-up777.ru/]Пин Ап[/url] Казино имеют официальную лицензию и стабильно выплачивают игрокам их выигрыши!

Reply to thread