File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,15 @@ The generated client is headless - you need to provide your own fetcher. Here ar
8585
8686### Type-Safe Error Handling
8787
88- The generated client includes discriminated union types for handling both success and error responses :
88+ The generated client supports two response modes :
8989
9090``` typescript
91- // With withResponse: true, get full response details
91+ // Default: Direct data return (simpler, but no error details)
92+ const user = await api .get (" /users/{id}" , {
93+ path: { id: " 123" }
94+ }); // user is directly typed as User object
95+
96+ // WithResponse: Full response details (for error handling)
9297const result = await api .get (" /users/{id}" , {
9398 path: { id: " 123" },
9499 withResponse: true
You can’t perform that action at this time.
0 commit comments