I am doing a GET request and am trying to save the response as a variable so the response data can be parsed.
Below is the GET request code. The output of the request is JSON format.
Adafruit_CC3000_Client apiWebSiteClient = cc3000.connectTCP(ip, 80);
// GET: Roaster status. Requires JWT in Authorization header
if (apiWebSiteClient.connected()) {
apiWebSiteClient.fastrprint(F("GET "));
apiWebSiteClient.fastrprint(apiWEBPAGE);
apiWebSiteClient.fastrprint(F(" HTTP/1.1\r\n"));
apiWebSiteClient.fastrprint(F("Host: ")); apiWebSiteClient.fastrprint(WEBSITE); apiWebSiteClient.fastrprint(F("\r\n"));
apiWebSiteClient.fastrprint(F("\r\n"));
apiWebSiteClient.println();
} else {
Serial.println(F("Connection failed"));
return;
}
Thanks!