This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 335
RFC: KV put with metadata #1734
Closed
ags799 opened this issue
Jan 15, 2021
· 7 comments
· Fixed by #1740 or jacobwgillespie/saved-for-later#77
Closed
RFC: KV put with metadata #1734
ags799 opened this issue
Jan 15, 2021
· 7 comments
· Fixed by #1740 or jacobwgillespie/saved-for-later#77
Comments
does it mean
is supported but not
|
Yes.
…On Mon, Jan 18, 2021 at 4:05 AM Sven Sauleau ***@***.***> wrote:
accept almost any kind of JSON [...] not strings though
does it mean
wrangler kv:key put my-key my-value --metadata '1'
is supported but not
wrangler kv:key put my-key my-value --metadata '"json"'
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#1734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWSCDLSKRKQXCDPWHPJ4DDS2QBV3ANCNFSM4WEPLAPQ>
.
|
Why? Doing e.g. the following from a worker is fine:
|
This comment has been minimized.
This comment has been minimized.
the third argument isn't metadata, it's an options object that may contain a metadata key. See https://developers.cloudflare.com/workers/runtime-apis/kv#metadata and https://github.com/cloudflare/workers-types/blob/master/index.d.ts#L610 My example above would result in
binding metadata to "some_string", not {metadata: "some_string"} |
Indeed, thanks for clarify. I hidden my comment since it's not relevant |
Never mind, I wasn't escaping quotes correctly in my curl command. The API will accept strings just fine. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
💡 Feature request
Perform a KV put with metadata from Wrangler:
Any kind of JSON works:
The text was updated successfully, but these errors were encountered: