MCPcopy Create free account
hub / github.com/bytecodealliance/wstd / http_body_fail

Function http_body_fail

examples/http_server.rs:136–142  ·  view source on GitHub ↗
(_request: Request<Body>)

Source from the content-addressed store, hash-verified

134}
135
136async fn http_body_fail(_request: Request<Body>) -> Result<Response<Body>> {
137 let body = StreamBody::new(once_future(async move {
138 Err::<Frame<Bytes>, _>(anyhow::anyhow!("error creating body"))
139 }));
140
141 Ok(Response::new(Body::from_http_body(body)))
142}
143
144async fn http_not_found(_request: Request<Body>) -> Result<Response<Body>> {
145 let response = Response::builder()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected