Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

338
Visualizações
Error ('httpResponse is not defined')Not sure where I've gone wrong but getting this error

Been trying to get this code to work for a while now can't see where I'm going wrong when I try to 'open with live server' on visual studio code and inspect the page I can see I'm getting the error:

GET  https://txvxu97okj3q.usemoralis.com:2053/server/functions/getNFT?_ApplicationId=hvSK2mZVUIMqGoMT8CJA06NJG8KPEAjrt2ZlLokl&nftId=1 400

and then also,

{code: 141, error: 'httpResponse is not defined'}
code: 141
error: "httpResponse is not defined"

not sure where the error is would greatly appreciate any help :)

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();

{code: 141, error: 'httpResponse is not defined'}

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda