Closed robertaboukhalil closed 5 years ago
Oups, turns out I was doing it wrong! It works when I do the following:
wrangler preview post variable=value
; andconst postData = await request.formData();
in the worker.js
to get the data that is passed via POST
Hello,
Thanks for the awesome library! I'm working with the demo example in Rust and have a question about sending POST requests with a body message.
In
worker.js
, I'm returning the request object as a JSON string:But calling it on the command line doesn't seem to pass the body along:
Is this the right way to do it?
In case it helps, I'm using wrangler 0.1.0: