Home > @cerbos/http > HTTP > (constructor)
Create a client for interacting with the Cerbos policy decision point (PDP) server over HTTP.
Signature:
constructor(baseUrl: string, options?: Options);
Parameter |
Type |
Description |
---|---|---|
baseUrl |
string |
base Cerbos PDP server URL (the Cerbos REST API must be available at |
options |
(Optional) additional client settings. |
Connect via HTTP:
const cerbos = new HTTP("http://localhost:3592");
Connect to the hosted demo PDP to experiment in the playground:
const cerbos = new HTTP("https://demo-pdp.cerbos.cloud", { playgroundInstance: "gE623b0180QlsG5a4QIN6UOZ6f3iSFW2" });