Hi guys, i'm using arduino YUN and i'm getting a problem here when i try to use HTTP requests in curl commands:
process.runShellCommand("curl https://www.google.com/");
while (process.available()>0) {
char c = process.read();
Serial.print(c);
}
It doesn't show me anything... However when i change https to http, it gives me a 301 error, which i do understand...
Best Regards.
ptjuanramos:
when i change https to http, it gives me a 301 error, which i do understand...
HTML Error 301 means "Moved Permanently". Your web client should re-try at the new address. My guess that Google is telling you to try again with the https:: protocol.
Sounds like something is wrong in handling the HTTPS protocol. Try accessing a page that doesn't force HTTPS::
You are right =) =)
I tested with a website that doesn't have ssl and it worked. So do you have any idea for this solution?
ptjuanramos:
So do you have any idea for this solution?
I've never used a Yün. I think it runs Linux so I would look at the Linux documentation for CURL to see if you need any special switches for secure web connections.
Try this PushoverYun. Look at buildCurlCommand().
Atte. Diego Navarro M.