DEV Community

Cover image for Switch API Environments Without a Second Client
YeLinAung for dust

Posted on Originally published at dust-codegen.pages.dev

Switch API Environments Without a Second Client

Dust HTTP client using one interface with production, staging, and local base URLs

Dust HTTP clients can keep one default API URL and accept a factory override for staging, tests, or local development. The endpoint declarations stay in one interface. Only the URL changes when the client is created.

Read the Dust HTTP client configuration guide.

Dust #HTTPClient #CodeGeneration

Top comments (0)