A simple REST client library for React Native applications that provides a base class for creating custom API clients. Version 0.1.1 is the latest stable release, but the package appears to be in early development with no recent updates. It simplifies RESTful calls by offering methods like GET, POST, PUT, PATCH, and DELETE, and supports custom headers, simulated delays for development, and returns Promises. Compared to alternatives like axios or fetch, it is minimal and tightly coupled to React Native, but lacks advanced features like interceptors, cancellation, or request/response transformations.
npm install react-native-rest-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GitHub API client by extending RestClient, with authentication token and simulated delay in development mode.
Implement your own timeout wrapper or switch to a more feature-rich HTTP client like axios.
Chain .then(response => response.data) or use a custom wrapper.
Ensure __DEV__ is globally defined as a boolean during development.
Use a fetch polyfill or switch to a universal HTTP client if targeting multiple environments.
Change to 'import RestClient from 'react-native-rest-client';'
Ensure methods are called on the instance: const api = new YourRestApi(); api.GET(...);
Add 'return' before this.GET() or this.POST() in your method.
No dependency data recorded yet.