Skip to content

Commit 7156ac9

Browse files
Fixes #33 wrong status code expected on version 1.x
1 parent 537d1e8 commit 7156ac9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/InfluxDbClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ bool InfluxDBClient::validateConnection() {
453453
_lastErrorResponse = FPSTR(UnitialisedMessage);
454454
return false;
455455
}
456-
String url = _serverUrl + (_dbVersion==2?"/ready":"/ping");
456+
// on version 1.x /ping will by default return status code 200
457+
String url = _serverUrl + (_dbVersion==2?"/ready":"/ping?verbose=true");
457458
INFLUXDB_CLIENT_DEBUG("[D] Validating connection to %s\n", url.c_str());
458459

459460
if(!_httpClient.begin(*_wifiClient, url)) {

0 commit comments

Comments
 (0)