Normal Mode
Returns just the response data.
ts
// Default — returns just the data
const users = await caller.users.getAll()
// → { data: [...], total: 3 }caller.users.getAll()SANDBOX
// run the request to see the responseRaw Data Mode
Returns status, headers, and data.
ts
// .raw accessor — returns { status, headers, data }
const response = await caller.users.raw.getAll()
// response.status → 200
// response.headers → Headers { etag, vary, … }: those that describe the answer
// response.data → { data: [...], total: 3 }caller.users.raw.getAll()SANDBOX
// run the request to see the responseType Safety
TypeScript follows the accessor: .raw types the call as an HttpResponse.
ts
// The .raw accessor changes what the call is typed to return
const data = await caller.users.getAll()
// ^? { data: User[]; total: number }
const response = await caller.users.raw.getAll()
// ^? HttpResponse<{ data: User[]; total: number }>
// { status: number; headers: Headers; data: … }With the .raw accessor, the return type wraps data in an HttpResponse object with status and headers. Without it, you get the data directly.