Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
axios and msgpack decoding

There's not much of answer from this: https://stackoverflow.com/search?q=axios+msgpack and also not much to find using googlefu.

I'm trying to decode response data with msgpack using axios but having error with TypeError: stream.getReader is not a function. However, if I use fetch, it works.

Using fetch:

async request = postData => {
  let response = await fetch("/api/filter-genes-by-organ", {
    method: "POST",
    body: JSON.stringify(_data),
    headers: { "Content-type": "application/json" },
  });
  return decodeAsync(response.body);
}

Using axios:

async request = postData => {
let headers = { "Content-Type": "application/json" };
  let response = await axios.post(`/api/${endpoint}`, postData, { headers }, {responseType: 'text' });
  return decodeAsync(response.data)
}

I'm still doing some tests and if i find a solution I will update this question, thank you.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda