© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3y ago•
5 replies
TheKaiser

How do i send data from worker to durable object fetch?

Trying to do something along the lines of
    const body = JSON.stringify({
        chatterId: request.chatterId,
        roomId: roomId,
        clientId: request.clientId,
    });

    return await roomDurable.fetch(request, {body: body});
    const body = JSON.stringify({
        chatterId: request.chatterId,
        roomId: roomId,
        clientId: request.clientId,
    });

    return await roomDurable.fetch(request, {body: body});


but I keep getting 500 Internal Server Error when i try this. If i remove the "body" part from the fetch, it all works. I need to pass in data like this but I've been having trouble finding examples of this. Also the request is just the request I get from a worker, should that be there?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Worker -> Durable Object fetch RPC call performance in Rust
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
7mo ago
Latency on worker and Durable object
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
17mo ago
How do I send traces from a worker to Grafana Tempo?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Access Durable Object RPC from Worker with Vite plugin
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2mo ago