cloudflare / cloudflare/workers-rs
[BUG] POST request not working with `Fetch::Request`
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### What version of `workers-rs` are you using?
0.3.0
### What version of `wrangler` are you using?
3.63.1
### Describe the bug
POST requests sent using `Fetch::Request` are never sent, and no error is emitted
### Steps To Reproduce
1. Use this example code:
```rs
let request = Request::new_with_init(
&webhook_url,
RequestInit::new()
.with_body(Some(serde_wasm_bindgen::to_value(
&json!({ "text": "hi"}),
)?))
.with_method(Method::Post),
)?;
Fetch::Request(request).send().await?;
```
2. Observe how the request is never sent, and code execution continues after the request is "sent" and awaited
Contributor guide
Assessment
This issue has not been assessed yet.