cloudflare / cloudflare/workers-rs
How to use fetch in workers rs
Open
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
If there was the following code in javascript as a response,
```
return await fetch("http://websocket.website.com", { headers: { "Upgrade": "websocket" } })
```
How would you do the same with workers-rs, to proxy a websocket request.
Contributor guide
Research direction
The issue provides a JavaScript fetch example and asks how to proxy a WebSocket request with workers-rs, but names no files or tests. Start by locating the workers-rs fetch and WebSocket entry points, then verify an equivalent request flow; done means the supported approach is demonstrated and works for the stated proxy case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100