Search by

victorycodedev / nativephp-fetch

victorycodedev

Truly asynchronous native HTTP networking for NativePHP Mobile on iOS and Android.

Package info

github.com/victorycodedev/nativephp-fetch

Type:nativephp-plugin

pkg:composer/victorycodedev/nativephp-fetch

Statistics

Installs: 143

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 5

v1.1.0 2026-09-03 16:24 UTC

This package is auto-updated.

Last update: 2026-09-07 02:38:33 UTC


README

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.

Features

  • 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

Compatibility

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.

Documentation

Read the complete documentation at victorycodedev.github.io/nativephp-fetch.

Installation

See the installation guide.

Usage (PHP)

See making requests with PHP and the NativeComponent example.

Usage (JavaScript)

See the JavaScript client guide.

Feature guides

Support

Report bugs or request help through the GitHub issue tracker.

License

NativePHP Fetch is open-source software released under the MIT License.