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

536
Visualizações
TypeError: Failed to fetch despite Postman returning a correct data

I've been trying to get this API working on one of my react native project and I keep getting failed to fetch errors. This is the code

let url = "API endpoint";

let headers = {
  Authorization:
    "working bearer token"
};

fetch(url, {
  method: "GET",
  headers: headers,
  body: null
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.log(error));

When I try this on a postman, it works just fine and returns correct data.

When the data is coming from API that is [] empty array, the fetch works again. But when there is a large data, I get a fetch error.

How can I solve this issue? Thank you

EDIT: To add, it is definitely not a CORS issue.

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