-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
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
m1racoli
Metadata
Metadata
Assignees
Labels
No labels
