4 Replies
Sure, something like this:
Should be a decent start, I ripped this from a larger project so lmk if some of it needs more explanation. FormData makes it semi-easy to do. If you want something more advanced like bindings, the easiest way is to update a worker that has bindings in dash, inspect the api call (ctrl+shift+i) it makes
The wrangler/workers-sdk is another good source to steal stuff from, to see how it does it. There's not really much good documentation on the various types as far as I know. I just use QuickType for the response info, can share those as well if useful
Thank you very much. I will not create a very detailed worker. I just want to create a default worker
That's enough for now. I think this code will work for me thank you. Chaika
ah ok, I use it to update but if you do it on a worker that doesn't exist, it just creates it. If it's worth explaining as well, the environment path there is always production, they used to be useful for service environments but CF abandoned those
Hmm got it. Thank you very much for this information and code