Creates a new instance of the OpaClient.
Configuration object for the OPA client.
Base URL of the OPA server (e.g., 'http://localhost:8181'). Trailing slashes are automatically removed.
Optionalheaders?: Record<string, string>Optional custom headers to include with every request.
Note: Certain headers are managed internally by the client (Accept, Accept-Encoding, Content-Type, Content-Encoding).
Providing these in headers may override internal behavior—use with caution.
A lightweight TypeScript client for the Open Policy Agent (OPA) REST API. Uses the native
fetchAPI and requires no external dependencies.Official REST API reference: https://www.openpolicyagent.org/docs/latest/rest-api/