Typed response wrapper returned by convenience methods (.get, .post, etc.)
Provides parsed response data with full type safety, similar to axios responses.
interface User { id: number; name: string }const { data, status } = await api.get<User>('/api/user/1');console.log(data.name); // fully typed Copy
interface User { id: number; name: string }const { data, status } = await api.get<User>('/api/user/1');console.log(data.name); // fully typed
Parsed response body (JSON, text, blob, etc.)
HTTP status code
HTTP status text
Response headers
true for 2xx status codes
Original Response object (escape hatch)
Typed response wrapper returned by convenience methods (.get, .post, etc.)
Provides parsed response data with full type safety, similar to axios responses.
Example