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

560
Visualizações
is it possible to change the axios adapter, the axios did not support fetch adapter

I am using axios "axios": "^0.25.0", in the google chrome exstension(manifest V3), because using fetch we should implement the interceptor by yourself. Now show when I run a post in google chrome extension shows this error message:

TypeError: adapter is not a function
    at dispatchRequest (background.js:836:10)
    at Axios.request (background.js:599:15)
    at Axios.post (background.js:634:17)
    at Function.wrap [as post] (background.js:1276:15)
    at do_post (background.js:2418:50)
    at handleTransImpl (background.js:2370:72)
    at handleMessage (background.js:2551:94)
    at background.js:2546:5

I searching from internet that found the axios using XHLHTTPRequest by defualt. Is it possible to make it using fetch by default. what should I do to make the axios support the google chrome extension? this is the http request code:

export function do_post(url:string,data:any){
    axios.post(url, JSON.stringify(data))
      .then(function (response) {
        console.log(response);
      })
      .catch(function (error) {
        console.log(error);
      });
}
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