spinframework / spinframework/spin-rust-sdk
P3 Request body seems unexpected
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 35
- Forks
- 23
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
I am writing a P3 handler using spin_sdk::http_wasip3::Request (not the IncomingRequest type used in the P3 double-echo example).
When I use the .body() method, I get a... thing... (&IncomingBody<Request>) which does not seem to let me access the body, but does let me access, say, the headers:
How do I get a body out of an IncomingBody<Request>? My specific interest is in processing the streaming body so I'm ultimately looking for a Stream or AsyncRead or something like that.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing spin_sdk::http_wasip3::Request with the P3 double-echo example's IncomingRequest, then inspect the IncomingBody API returned by body(). Done means identifying a supported way to process the request body as a stream or AsyncRead, or defining the SDK support needed for that access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100