keyv.exists
0.000005

Checks if a key exists.

Arguments
bucketrequired
The bucket the key is stored under.
key
The key to check for existence.
Return Value
true if the key exists, otherwise false.
something went wrong :(
Checking if a key exists in a bucket
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.keyv.set.call(
  bucket: "b299f2ad", value: "foo"
)

client.keyv.exists.call(
  bucket: "b299f2ad"
)
client.keyv.set.call(
  undefined, b299f2ad
);

client.keyv.exists.call(
  undefined, b299f2ad
);
curl "https://proc.run/keyv/set?bucket=b299f2ad" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain" \
--data "foo"

curl "https://proc.run/keyv/exists?bucket=b299f2ad" --silent --request POST \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain"
 

true


Stuck? Want to chat about an idea? Join the community on Discord.