Using aRest api library, II get 78:525: error: no matching function for call to ‘HardwareSerial::print(ApiCommandClass&) at the line
<code>return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
</code>
<code>return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
</code>
return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
in the function:
<code>int apiCallBand(String request) {
String action = "band";
ApiCommandClass command(action, request);
String apiReturn = SWRRestFunctionsClass::ProcessCommand(command.ToJson());
client.println(apiReturn);
return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
}
</code>
<code>int apiCallBand(String request) {
String action = "band";
ApiCommandClass command(action, request);
String apiReturn = SWRRestFunctionsClass::ProcessCommand(command.ToJson());
client.println(apiReturn);
return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
}
</code>
int apiCallBand(String request) {
String action = "band";
ApiCommandClass command(action, request);
String apiReturn = SWRRestFunctionsClass::ProcessCommand(command.ToJson());
client.println(apiReturn);
return apiReturn.indexOf(ERROR) > 0 ? INVALID : SUCCESS;
}
referenced by
<code>
// Create aREST instance
aREST rest = aREST();
// Create an instance of the server
WiFiServer server(LISTEN_PORT);
WiFiClient client;
char BAND[] = "band";
rest.function(BAND, apiCallBand);
</code>
<code>
// Create aREST instance
aREST rest = aREST();
// Create an instance of the server
WiFiServer server(LISTEN_PORT);
WiFiClient client;
char BAND[] = "band";
rest.function(BAND, apiCallBand);
</code>
// Create aREST instance
aREST rest = aREST();
// Create an instance of the server
WiFiServer server(LISTEN_PORT);
WiFiClient client;
char BAND[] = "band";
rest.function(BAND, apiCallBand);
I don’t understand how the return of an int would get an error in the ApiCommandClass???
Thanks
Abbott
I tried for a clean build. Ugggh