cloudflare / cloudflare/workers-rs

[BUG] POST request not working with `Fetch::Request`

Open
#594 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.