Service binding fetcher misunderstanding
I am struggling to call a worker from my pages, everything is setup but I don't understand what I need to pass to the fetcher.
My code looks like this currently
But I fail to understand what URL I need to give the fetcher to call my worker instead of my local url and every example I found only cloned the request received by pages and passed it on. Which is not what I am trying to do.
The worker I am trying to access takes the form of a REST API so I can't just pass my request.
4 Replies
Not sure if it's an correct answer but any url works.
So I should point to my worker URL? How can I get that from a pages function?
So I should point to my worker URL? Yes.
How can I get that from a pages function?
You can just write it in your code. When deploying your worker you get
yourproject.workers.dev
.I use: