Skip to content

Commit 99ceffe

Browse files
authored
Merge pull request #213 from WebAssembly/use-http-types
fix(p3): use http types
2 parents 9ee8fc2 + 167b307 commit 99ceffe

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

tests/rust/wasm32-wasip3/src/bin/http-response.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ wit_bindgen::generate!({
55
package test:test;
66
77
world test {
8-
include wasi:http/service@0.3.0-rc-2026-01-06;
8+
import wasi:http/types@0.3.0-rc-2026-01-06;
99
include wasi:cli/command@0.3.0-rc-2026-01-06;
1010
}
1111
",
@@ -14,7 +14,7 @@ wit_bindgen::generate!({
1414
generate_all
1515
});
1616

17-
use wasi::http::types::{ErrorCode, Fields, HeaderError, Request, Response};
17+
use wasi::http::types::{Fields, HeaderError, Response};
1818

1919
fn test_response_field_default_values(response: &Response) {
2020
assert_eq!(response.get_status_code(), 200);
@@ -65,12 +65,6 @@ async fn test_response() -> Response {
6565
struct Component;
6666
export!(Component);
6767

68-
impl exports::wasi::http::handler::Guest for Component {
69-
async fn handle(_r: Request) -> Result<Response, ErrorCode> {
70-
Ok(test_response().await)
71-
}
72-
}
73-
7468
impl exports::wasi::cli::run::Guest for Component {
7569
async fn run() -> Result<(), ()> {
7670
test_response().await;

0 commit comments

Comments
 (0)