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

154
Views
Getting HttpErrorResponse for get request returning byte data as response?

getting HttpErrorResponse using this headers, api returning byte data as response.

let headers = {
      headers: new HttpHeaders({
        'Content-Type': 'application/octet-stream',
        'responseType':'arraybuffer' as 'json',
        'uid':uid
      })
    };

API REQUEST returning byte data.

this.http.get(url,headers)
    .pipe(map((res)=>{
      console.log(res)  
      return res;
    }),err=>{
      console.log(err)  //getting HttpErrorResponse
      return err;
    }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

removed responseType HttpHeaders and placed it in headers object directly. It worked for me.

let headers = {
      headers: new HttpHeaders({
        'Content-Type': 'application/octet-stream',
        'uid':uid
      }),
      'responseType':'arraybuffer' as 'json',
    };
about 4 years ago · Juan Pablo Isaza Report
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!