Set else to fail with error message

This commit is contained in:
Jesse Hills 2022-03-01 12:38:18 +13:00
parent 8491ec9a84
commit 0be672179d
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -76,7 +76,9 @@ HttpResponse HttpRequestIDF::send(bool capture_response) {
} else if (this->method_ == "PATCH") {
method = HTTP_METHOD_PATCH;
} else {
method = HTTP_METHOD_GET;
this->status_set_warning();
ESP_LOGE(TAG, "HTTP Request failed; Unsupported method");
return {-1, 0, {}};
}
esp_http_client_config_t config = {};