DocumentationInheritance & Overrides

Inheritance & Overrides

As your libraries grow, repeating the same authentication tokens, base URLs, or default headers on every single request becomes tedious. ForgeReq solves this with a powerful nesting and inheritance system.

Inheritance

The Cascade

Settings defined at higher levels automatically flow down to individual requests:

  1. Library Defaults: Set global headers (like Accept: application/json) at the root Library level.
  2. Folder Shelves: Create folders to group related endpoints. You can define authentication schemes (like a Bearer token) at the folder level, which instantly applies to all endpoints inside it.
  3. Endpoint Overrides: Endpoints inherit everything from their parents. If an endpoint needs a different token or a custom header value, you can explicitly override the inherited setting at the endpoint level.

Visual Indicators

The UI provides clear visual indicators (like dimmed placeholder text or “Inherited” badges) in the Auth and Headers tabs to show exactly where a setting is coming from, ensuring you always know how your final request is being constructed.