@void-snippets/client
@void-snippets/client
Framework-agnostic HTTP resource service powered by axios.
#What is in this package?
@void-snippets/client provides the HTTP layer. Works anywhere TypeScript runs — React, Vue, Node, plain scripts.
typescript
import { configure, ResourceService, handleApiError } from '@void-snippets/client';| Export | Kind | Description |
|---|---|---|
configure(instance) | function | Register the shared axios instance once at startup |
ResourceService | class | Generic CRUD base class — extend once per API resource |
handleApiError(error) | function | Normalise any thrown error into a clean Error object |