We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 892c3a9 + c34e84c commit 90debccCopy full SHA for 90debcc
src/InfluxDbClient.cpp
@@ -545,6 +545,12 @@ bool InfluxDBClient::validateConnection() {
545
}
546
// on version 1.x /ping will by default return status code 204, without verbose
547
String url = _serverUrl + (_dbVersion==2?"/health":"/ping?verbose=true");
548
+ if(_dbVersion==1 && _user.length() > 0 && _password.length() > 0) {
549
+ url += "&u=";
550
+ url += urlEncode(_user.c_str());
551
+ url += "&p=";
552
+ url += urlEncode(_password.c_str());
553
+ }
554
INFLUXDB_CLIENT_DEBUG("[D] Validating connection to %s\n", url.c_str());
555
556
if(!_httpClient->begin(*_wifiClient, url)) {
0 commit comments