TheKaiser
TheKaiser
CDCloudflare Developers
Created by TheKaiser on 8/31/2023 in #workers-help
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?
6 replies