wrangler config look like?




content-type header in the response?
WorkerKV for some experiment and this is my codeexpiration props again?cloudflare package is probably the easiest way, though note that using it is not ideal for performance reasons, so we recommend running KV operations through a Workernpm i cloudflare. There are 81 other projects in the npm registry using cloudflare.
.json(body) instead be .json(&body) - ?)From the documentation for .json() we can see that it expects a arbitrary serde serializable type. This indicates that what it's doing is creating JSON text from the given value. So, you're sending a JSON-quoted string containing JSON to the server, which is presumably not what it's expecting.… which would describe why you’re likely sending an empty body.
I haven't worked with reqwest, but it looks like for your use case with a JSON string, you would use .body() to provide the string and .header() to specify the JSON Content-Type.
await this.namespace.put(keyWithPrefix, JSON.stringify(payload), {
expiration: Math.floor(payload.resetTime.getTime() / 1000),
});