netflex/http
HTTP client for the Netflex platform: a small, Laravel-friendly wrapper around Netflex API endpoints with fluent requests, authentication, and structured responses. Handles the boilerplate of talking to Netflex services so your application code stays clean and readable.
Before writing any code, understand what you're consuming. netflex/http is a read-only subtree split of netflex/framework — it exists so the HTTP component can be required independently, not as a standalone project you contribute to.
netflex/framework (or your Netflex platform install) rather than this split. Require netflex/http directly only when you need the HTTP layer in isolation and you're prepared to keep its version locked in step with the rest of the framework.composer.json first. It tells you the autoload namespace, PHP constraint, and — critically — which PSR interfaces or HTTP backends (PSR-7, PSR-18, PSR-15, Guzzle, Symfony HttpFoundation) the component builds on. That single file defines most of your integration surface.src/ in dependency order. Typical layout: request abstraction → response abstraction → client/transport → middleware or handlers. Read the tests directory alongside each class; in split repos the tests are the most reliable usage documentation you'll get.CHANGELOG.md / tags. Because versions are mirrored from the monorepo, the tag you see here should match a framework version. Note it.If the repo has zero dependents and zero stars, treat every assumption as unverified — confirm the API by reading source, not by searching for blog posts.
Wrap, don't scatter. Bind the component's client/factory as a singleton in a service provider and inject a small application-level service. This keeps the component swappable and gives you one place to add headers, timeouts, and logging.
// Illustrative — confirm actual class names under src/ before use.
$this->app->singleton(\Netflex\Http\Client::class, function ($app) {
return new \Netflex\Http\Client(
baseUrl: config('services.netflex.base_url'),
timeout: config('services.netflex.timeout', 10),
);
});
Request/response as DTOs. If the component ships request and response value objects, use them as typed boundaries: build a request in your service, hand back a response DTO to your controller, and map to your own resource classes. Never leak raw transport objects into views or jobs.
Middleware/handler stacking is the natural extension point for cross-cutting concerns: auth token injection, correlation IDs, retry policies, and logging. Keep the stack shallow and ordered deliberately — outer middleware sees the request first and the response last.
Testing pattern. Because this is a transport layer, test it in two layers:
Interop over replacement. If the component implements PSR-7/PSR-18/PSR-15, decorate it rather than fork it. A decorator that adds a header or logs latency survives framework upgrades; a modified copy does not.
Pick one HTTP path per feature. In a Laravel app you likely also have Illuminate\Support\Facades\Http. Choose per integration — framework component for Netflex APIs, Http facade for third-party APIs — and document the choice. Mixing both for the same upstream leads to two different retry/timeout behaviors.
netflex/framework. Anything merged here is overwritten by the next split. Fork the monorepo, not this.netflex/framework and netflex/http are installed at mismatched versions you get missing classes, autoload conflicts, or duplicated symbols. Pin them together in composer.json and upgrade in lockstep.config(/env( to find what it actually reads.How can I help you explore Laravel packages today?