esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
285 stars 161 forks source link

Add comment with HTTPS example #394

Closed weiying-chen closed 3 months ago

weiying-chen commented 3 months ago

This PR will hopefully prevent this from happening again.

At first, I thought about creating a separate https_client.rs, but that would create a lot of duplicate code (also it'd look strange if http_client.rs had an HTTPS version and http_server.rs didn't). I feel the comment will get the message across with no code duplication.

Note: There's aliasing here:

use esp_idf_svc::http::client::{Configuration as HttpConfiguration, EspHttpConnection};

To prevent conflict with this:

use embedded_svc::{
    // More imports
    wifi::{AuthMethod, ClientConfiguration, Configuration},
};