Need help receiving image through HTTPS request
Posted: Mon Feb 13, 2017 10:37 pm
Hi guys, I need a hand with receiving an image as the title says.
Basically, I have one of the Axis cameras and I'm trying to get it to send me an image. I've been using the Adafruit HUZZAH ESP8266 to send requests to it to pan, tilt, zoom and display general info about the camera and those functions have been working out just fine, but I seem to have hit a brick wall when it comes to receiving images.
I'm using Arduino IDE and this library: https://github.com/esp8266/Arduino
I've been trying to work on a solution based on this snippet from the example code:
I've managed to read and display everything the camera sends as a response but only because it was a string. I have no clue what to do with the actual file that it gives me while I request a snapshot. Is there a way to save it to the card? Or maybe an SD card? Regardless, I haven't found any answers in the ESP8266 documentation on github.
Any and all help would be appreciated, thanks in advance!
Basically, I have one of the Axis cameras and I'm trying to get it to send me an image. I've been using the Adafruit HUZZAH ESP8266 to send requests to it to pan, tilt, zoom and display general info about the camera and those functions have been working out just fine, but I seem to have hit a brick wall when it comes to receiving images.
I'm using Arduino IDE and this library: https://github.com/esp8266/Arduino
I've been trying to work on a solution based on this snippet from the example code:
Code: Select all
// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
I've managed to read and display everything the camera sends as a response but only because it was a string. I have no clue what to do with the actual file that it gives me while I request a snapshot. Is there a way to save it to the card? Or maybe an SD card? Regardless, I haven't found any answers in the ESP8266 documentation on github.
Any and all help would be appreciated, thanks in advance!