diff --git a/crates/wasi-http/src/http_impl.rs b/crates/wasi-http/src/http_impl.rs index da06b3b0e6dc..05c92f8fb7b4 100644 --- a/crates/wasi-http/src/http_impl.rs +++ b/crates/wasi-http/src/http_impl.rs @@ -1,4 +1,5 @@ use crate::bindings::http::{ + incoming_handler::{self, IncomingRequest, ResponseOutparam}, outgoing_handler, types::{FutureIncomingResponse, OutgoingRequest, RequestOptions, Scheme}, }; @@ -178,6 +179,16 @@ impl outgoing_handler::Host for T { } } +impl incoming_handler::Host for T { + fn handle( + &mut self, + _request: IncomingRequest, + _response_out: ResponseOutparam, + ) -> wasmtime::Result<()> { + todo!() + } +} + fn timeout_error(kind: &str) -> anyhow::Error { anyhow::anyhow!(crate::bindings::http::types::Error::TimeoutError(format!( "{kind} timed out" diff --git a/crates/wasi-http/src/incoming_handler.rs b/crates/wasi-http/src/incoming_handler.rs deleted file mode 100644 index 3fd26bf7d0af..000000000000 --- a/crates/wasi-http/src/incoming_handler.rs +++ /dev/null @@ -1,12 +0,0 @@ -use crate::bindings::http::types::{IncomingRequest, ResponseOutparam}; -use crate::WasiHttpView; - -impl crate::bindings::http::incoming_handler::Host for T { - fn handle( - &mut self, - _request: IncomingRequest, - _response_out: ResponseOutparam, - ) -> wasmtime::Result<()> { - anyhow::bail!("unimplemented: [incoming_handler] handle") - } -} diff --git a/crates/wasi-http/src/lib.rs b/crates/wasi-http/src/lib.rs index c6b072b1e60f..b0b07068b61c 100644 --- a/crates/wasi-http/src/lib.rs +++ b/crates/wasi-http/src/lib.rs @@ -4,7 +4,6 @@ use std::fmt::{self, Display}; pub mod body; pub mod http_impl; -pub mod incoming_handler; pub mod proxy; pub mod types; pub mod types_impl;