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
Get server response before axios response wrapper for functions

What I did

  • Set response wrapper for functions, services, and repositories class for Axios. This is called RepositoryResponse
  • Every request now will be in one structure {status,message,data, error, meta}

Now, from the backend, I am returning a downloadable Excel file as

 return Excel::download($report, 'coupons-report.xlsx');

What I see

The server response comes correctly and this is what I need to have. But when I log the response in the function, it comes empty.

Here is an image of what I mean The top response is the "raw" response (my target). However, the below one is the one I am getting when I return the response from this.$axios.get.

My question is how can I get the data on the top?

enter image description here

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!