Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] POST request not working with Fetch::Request #594

Open
1 task done
SkyfallWasTaken opened this issue Jul 7, 2024 · 1 comment
Open
1 task done

[BUG] POST request not working with Fetch::Request #594

SkyfallWasTaken opened this issue Jul 7, 2024 · 1 comment

Comments

@SkyfallWasTaken
Copy link

Is there an existing issue for this?

  • 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:
    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?;
  1. Observe how the request is never sent, and code execution continues after the request is "sent" and awaited
@SkyfallWasTaken
Copy link
Author

The temporary workaround for this is to use a library like reqwest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant