React Native HTTP is a lightweight HTTP service wrapper for React Native applications, designed to simplify API interactions with built-in JWT token handling. Version 0.0.3 is the latest stable release, but the package appears to be in early development with sparse documentation. It provides an abstract base class HTTPService that supports GET, POST, PUT, DELETE methods with automatic token management (Authorization header, Bearer prefix, storage key). Key differentiators: minimal overhead, token lifecycle handled internally, supports per-request authorization skipping. However, it lacks TypeScript definitions, testing, and a clear roadmap; alternatives like axios or react-native-netinfo are more mature. The project is currently in maintenance mode with infrequent updates.
npm install react-native-httpVerified import paths — ran on the pinned version, not inferred.
Creates a custom API class extending HTTPService with GET and POST methods, then instantiates it and calls getUsers.
Consider switching to @react-native-async-storage/async-storage as a polyfill, or implement custom token storage.
Always pass options as the third argument; for GET and DELETE, the second argument (body) should be null if not needed.
Wrap calls in try-catch or add .catch handlers to inspect error objects.
Use named import: import { HTTPService } from 'react-native-http'Run npm install react-native-http --save
Ensure the HTTPService constructor is called with a baseURL and that the storageTokenPrefix (default: react_native_http_jwt_token) is set in AsyncStorage.
No dependency data recorded yet.