You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EspHttpServer.handle_get methods not found at EspHttpServer struct when i test http server demo.
build error:
Compiling http-server v0.1.0 (/home/iric/code/learn/espressif-trainings/intro/http-server)
error: could not compile `http-server` due to 3 previous errors; 2 warnings emitted
warning: unused imports: `io::Write`, `registry::Registry`
--> examples/http_server.rs:10:20
|
10 | http::server::{registry::Registry, Response},
| ^^^^^^^^^^^^^^^^^^
11 | io::Write,
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0599]: no method named `handle_get` found for struct `EspHttpServer` in the current scope
--> examples/http_server.rs:31:12
|
31 | server.handle_get("/", |_request, response| {
| ^^^^^^^^^^ method not found in `EspHttpServer`
error[E0599]: no method named `handle_get` found for struct `EspHttpServer` in the current scope
--> examples/http_server.rs:41:12
|
41 | server.handle_get("/temperature", move |_request, response| {
| ^^^^^^^^^^ method not found in `EspHttpServer`
warning: unused import: `Response`
--> examples/http_server.rs:10:40
|
10 | http::server::{registry::Registry, Response},
| ^^^^^^^^
error: aborting due to 2 previous errors; 2 warnings emitted
The text was updated successfully, but these errors were encountered:
I have the suspicion that the http module has not only changed in later versions of embedded-svc, but also is now only available behind the experimental flag. The docs do not show the module, but it is available in the source code. https://docs.rs/embedded-svc/latest/src/embedded_svc/lib.rs.html#21
EspHttpServer.handle_get methods not found at EspHttpServer struct when i test http server demo.
build error:
The text was updated successfully, but these errors were encountered: