From 8957e9ca9bc589e2fc0bc85a914ed7f493495f61 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 26 Apr 2021 13:56:54 +0200 Subject: [PATCH] std::string_view instead of const char * --- src/asynchttprequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asynchttprequest.cpp b/src/asynchttprequest.cpp index c5436b6..0e6c4ee 100644 --- a/src/asynchttprequest.cpp +++ b/src/asynchttprequest.cpp @@ -185,7 +185,7 @@ std::optional AsyncHttpRequest::start(const std::string &url) } else { - const auto result = client.set_url(url.c_str()); + const auto result = client.set_url(url); ESP_LOG_LEVEL_LOCAL((result == ESP_OK ? ESP_LOG_DEBUG : ESP_LOG_ERROR), TAG, "client.set_url() returned: %s (%s)", esp_err_to_name(result), url.c_str()); if (result != ESP_OK) return std::string{"client.set_url() failed: "} + esp_err_to_name(result) + " (" + url + ')';