Cloudflare:修订间差异

来自MediaWiki
跳转到导航 跳转到搜索
Admin留言 | 贡献
创建页面,内容为“== KV == === API === https://developers.cloudflare.com/api/operations/workers-kv-namespace-write-key-value-pair-with-metadata === 读取 === <syntaxhighlight lang="bash"> curl "https://api.cloudflare.com/client/v4/accounts/${account_identifier}/storage/kv/namespaces/${namespace_identifier}/values/${key_name}" \ -H "Authorization: Bearer ${API_TOKEN}" </syntaxhighlight> === 写入 === <syntaxhighlight lang="bash"> curl --request PUT \   --url https://api.c…”
 
Admin留言 | 贡献
无编辑摘要
 
第19行: 第19行:
  --form metadata='[]' --form value=${VALUE}
  --form metadata='[]' --form value=${VALUE}
</syntaxhighlight>
</syntaxhighlight>
[[分类:Cloudflare]]

2024年1月16日 (二) 05:33的最新版本

KV[编辑 | 编辑源代码]

API[编辑 | 编辑源代码]

https://developers.cloudflare.com/api/operations/workers-kv-namespace-write-key-value-pair-with-metadata

读取[编辑 | 编辑源代码]

curl "https://api.cloudflare.com/client/v4/accounts/${account_identifier}/storage/kv/namespaces/${namespace_identifier}/values/${key_name}" \

-H "Authorization: Bearer ${API_TOKEN}"

写入[编辑 | 编辑源代码]

curl --request PUT \
  --url https://api.cloudflare.com/client/v4/accounts/${account_identifier}/storage/kv/namespaces/${namespace_identifier}/values/${key_name}" \
   -H "Authorization: Bearer ${API_TOKEN}"\
  -H 'Content-Type: multipart/form-data' \
  --form metadata='[]' --form value=${VALUE}