Skip to content
Webinar - May 13th: How Criteo powers real-time decisions with a reduced footprintRegister now

Asynchronous write

The following example performs an async put.

let policy = new Policy();
let key = new Key("test", "myset", "mykey");
let bins = {bin: "stringValue"}
let meta = { ttl: 10000 }
let record = await client.get(key, bins, meta, policy)

A callback can be provided to handle results as an alternative to returning a promise.

let policy = new Policy();
let key = new Key("test", "myset", "mykey");
let bins = {bin: "stringValue"}
let meta = { ttl: 10000 }
let record = client.get(key, bins, meta, policy, (error, client) => { /* Add Client code here */ })
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?