Closed weiying-chen closed 8 months ago
Thanks a lot! This worked:
// Alias needed because of this line: `let wifi_configuration: Configuration = Configuration::Client(ClientConfiguration`
use esp_idf_svc::http::client::{Configuration as HttpConfiguration, EspHttpConnection};
let config = &HttpConfiguration {
crt_bundle_attach: Some(esp_idf_svc::sys::esp_crt_bundle_attach),
..Default::default()
};
let mut client = HttpClient::wrap(EspHttpConnection::new(&config)?);
get_request(&mut client)?;
I think this should be in the official examples? I was stuck for days.
I think this should be in the official examples? I was stuck for days.
Feel free to open a PR for a new / improved HTTP client example. I can only dedicate so much of my free time to this project in general, and writing examples for folks in particular. :)
You're right. You're already doing a great job. Okay, I'll open a PR soon.
Before I open the PR, one question: how come the http_client.rs example runs without crt_bundle_attach: Some(esp_idf_svc::sys::esp_crt_bundle_attach)
? Or it hasn't been tested yet?
Because it is using HTTP, not HTTPS.
Oh, got it. Thanks for the clarification.
I got this error:
In this repository (esp-idf-svc), there is mention of "esp_tls" in the following files: src/tls.rs, ws.rs, src/mqtt/client.rs
What am I supposed to add to my project to stop getting that error?
Note: this is what my entire file looks like.