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

115
Views
How do I access the Response Headers using ServiceStack

I'm using react with Redux toolkit but I'm unbale to access the Response headers

return await client
.get(new Users())
.then((data) => {

// how to I access the Response Header here?
  console.log("data", data);
  return data;
})
.catch((error) => {

});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm assuming you're referring to ServiceStack's TypeScript Service Client, the public API of which you can find on index.d.ts where you can use the instance requestFilter and responseFilter:

export declare class JsonServiceClient {
    //...
    requestFilter: (req: IRequestInit) => void;
    responseFilter: (res: Response) => void;
}

To inspect the underlying W3C fetch API's Request / Response, e.g:

let client = new JsonServiceClient();
client.responseFilter = function(r) {
    console.log(r.headers)
}

client.get(new Users())
    .then(...)
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!