Project-rest-client is a REST API client library designed for React Native and Laravel backends, version 1.3.4. It provides a structured way to interact with Project DB REST APIs, offering features like offline SQL caching, model abstraction, and query building. The library simplifies API integration with configurable endpoints, live data synchronization, and offline support. Compared to generic HTTP clients, it is opinionated towards Laravel/Project DB conventions and includes built-in caching and model management. Release cadence appears low, with limited community adoption.
npm install project-rest-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the REST client with a config object and performs a GET request to fetch a user by ID.
Use only in React Native projects, or provide necessary polyfills for fetch and async storage.
Always provide baseURL and apiKey. Refer to Config documentation for optional fields.
Use client.get/post/put/delete directly instead of query builder methods.
Enable offline mode by setting offline: true in Config and ensuring AsyncStorage is installed.
Wrap responses or use a generic HTTP client for custom backends.
Ensure your API returns data in the format { data: ... } or configure the response mapping.Provide baseURL in the Config constructor.
Only use this package within a React Native project.
Check the baseURL and ensure the server is running.
No dependency data recorded yet.