Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!