He estado tratando de hacer que este código funcione por un tiempo, ahora no puedo ver dónde me estoy equivocando cuando intento 'abrir con el servidor en vivo' en el código de Visual Studio e inspecciono la página. Puedo ver que estoy recibiendo el error:
GET https://txvxu97okj3q.usemoralis.com:2053/server/functions/getNFT?_ApplicationId=hvSK2mZVUIMqGoMT8CJA06NJG8KPEAjrt2ZlLokl&nftId=1 400y luego también,
{code: 141, error: 'httpResponse is not defined'} code: 141 error: "httpResponse is not defined"No estoy seguro de dónde está el error, agradecería mucho cualquier ayuda :)
Moralis.start({ serverUrl: "https://txvxu97okj3q.usemoralis.com:2053/server", appId: "hvSK2mZVUIMqGoMT8CJA06NJG8KPEAjrt2ZlLokl" }); function fetchNFTMetadata(NFTs){ for (let i = 0; i < NFTs.length; i++) { let nft = NFTs[i]; let id = nft.token_id; //Call Moralis Cloud function -> Static JSON file fetch("https://txvxu97okj3q.usemoralis.com:2053/server/functions/getNFT?_ApplicationId=hvSK2mZVUIMqGoMT8CJA06NJG8KPEAjrt2ZlLokl&nftId=" + id) .then(res => res.json()) .then(res => console.log(res)) } } async function initializeApp(){ let currentUser = Moralis.User.current(); if(!currentUser){ current = await Moralis.Web3.authenticate(); } const options = { address: "0x3be1812365e150157a326a8d0860a72fadee2db0", chain: "rinkeby" }; let NFTs = await Moralis.Web3API.token.getAllTokenIds(options); console.log(NFTs); fetchNFTMetadata(NFTs.result); } initializeApp();{código: 141, error: 'httpResponse no está definido'}