Skip to main content

Hello! I have no idea to how use fetch api with key

 

 connectedCallback() {

      fetch("https://api.spoonacular.com/recipes/random?apiKey=ec176c60db384bfdb8eb7a2b149f063b")

      .then((res)=>{

 

  return res.json()

      }) 

How use fetch api with keys

 

3 件の回答
  1. 2023年4月11日 4:53
    Please don't use fetch api when you need to use username/password or in your case, API key. For such cases, always use Apex to make a callout.
0/9000