keyv.exists0.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: "e8773849", value: "foo"
)
client.keyv.exists.call(
bucket: "e8773849"
)
client.keyv.set.call(
undefined, e8773849
);
client.keyv.exists.call(
undefined, e8773849
);
curl "https://proc.run/keyv/set?bucket=e8773849" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: text/plain" \
--data "foo"
curl "https://proc.run/keyv/exists?bucket=e8773849" --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.