Fetch is a free community networking plugin for NativePHP Mobile. It provides an expressive, fluent API for truly asynchronous HTTP requests on Android and iOS, backed by OkHttp and URLSession.
Requests return a stable ID immediately, while responses, failures, retries, cancellation, and transfer progress are delivered through NativePHP events. Fetch is intended for native application interactions; queued jobs should use Laravel's HTTP client instead.
- GET, POST, PUT, PATCH, and DELETE requests
- JSON, form-encoded, raw, and multipart request bodies
- Multiple attachments and repeated multipart field names
- Upload and download progress events
- Streaming file downloads
- Opt-in retries with exponential backoff
- Per-attempt timeouts and explicit cancellation
- Request-local base URLs and reusable application macros
- Fluent PHP and official JavaScript clients
- Request fakes for Pest and PHPUnit tests
Fetch 1.x supports PHP 8.4+, NativePHP Mobile ^4.1, Android API 29+, and
iOS 18+. The NativePHP constraint includes all compatible 4.x releases and
excludes future major versions.
Read the complete documentation at victorycodedev.github.io/nativephp-fetch.
See the installation guide.
See making requests with PHP and the NativeComponent example.
See the JavaScript client guide.
Report bugs or request help through the GitHub issue tracker.
NativePHP Fetch is open-source software released under the MIT License.