KV API giving FormData errors
I'm trying to write to KV, following the API docs here:
https://developers.cloudflare.com/api/operations/workers-kv-namespace-write-key-value-pair-with-metadata
However I continue to get this response
Here's my code with some hardcoded values for testing:
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
3 Replies
Is this from a worker?
No it's not.
I solved this by removing the 'Content-Type' header. Not sure why it's there in the docs?
also the docs don't say how to add expirations?
I think there’s a special way to get the boundary part.
For the expiration it should be be other values of the form for it