Not able to parse request body when using service bindings
Hello everyone,
I would like to use service bindings and implemented a PoC according to the official documentation: https://developers.cloudflare.com/workers/configuration/bindings/about-service-bindings/
But I'm facing a problem now and don't know how to tackle it. I would like to parse the request body, after the authentication was successful and it works on my machine (haha), but after deployment the request takes forever and then timesout. My code looks like this:
Within service-1:
What am I missing here? As far as I got it debugged, I know it's the
await request.json()
that seems to be the problem.Cloudflare Docs
Service bindings - Configuration · Cloudflare Workers docs
Service bindings are an API that facilitate Worker-to-Worker communication via explicit bindings defined in your configuration.
2 Replies
Are you getting an error, or the request just hangs? Is this when deployed or when doing local development?
It hangs completely. Locally it works flawless, just the deployment has a problem.