victorycodedev/nativephp-fetch
Fetch-style HTTP client for NativePHP, giving native desktop apps a simple, familiar way to make requests. Lightweight and Laravel-friendly, it aims to streamline pulling remote data into your native windows without leaving the ecosystem you already know.
Fetch::baseUrl() with relative URLs (including query strings and downloads) is a config-driven environment switch, and statusIs() plus status helpers (created(), notFound(), unauthorized(), unprocessableEntity(), tooManyRequests()) remove boilerplate error-branching code from every endpoint.FetchRequestStarted / FetchRequestCompleted / FetchRequestFailed Laravel events make network behavior observable through the standard event system — this enables logging, metrics, retry telemetry, and support diagnostics without touching call sites, while #[On] in NativeComponents still works for UI-level handling.Adopt when:
Look elsewhere when:
Http client already covers this; Fetch adds a native-runtime dependency without benefit.To executives: This release makes network code in our native app cheaper to build and easier to govern. Reusable request configurations mean auth headers and timeouts are defined once instead of scattered across features, which reduces both defect surface and review time. Standard response helpers cut repetitive error-handling code, and built-in global request events give us visibility into failures for support and reliability work — capability we would otherwise build ourselves. It is backward compatible, so there is no rework cost to adopt.
To engineering: v1.1.0 is a DX release. Use Fetch::baseUrl() for environment-driven relative URLs, define macros for shared headers/tokens/timeouts, and prefer statusIs() / status helpers over manual code comparisons. Listen to FetchRequestStarted/Completed/Failed globally for logging and metrics — #[On] still works in NativeComponents. Everything existing continues to work; adopt incrementally and pin the version, since the API is still evolving.
How can I help you explore Laravel packages today?