When I use http://www.hurl.it/ to send post it works, and the tweet appears, but the Yun is not having the same results. Nothing gets posted when the above code executes.
How would I troubleshoot this? I'm new to networking on a micro controllers and don't know what else to try
Another small thing I noticed is that the post in client.post does not turn orange as it does in client.get or client.read. This is just a cosmetic bug, right?
The method post wants Destination as first parameter and Body as second one. Try:
client.post( httpDestination, httpBody);
p.s: Looking at here ( API Reference - MATLAB & Simulink ) I see that the parameter for defining the key is called "key" instead of "api_key". I don't know ThinkSpeak so this is just an hint
@sonnyyu
It's just an HTTP post problem, HTTP get works great.
What is root CA? I don't understand what it is/why I need it.
@Angelo9999
Whoops, thanks for catching that. The order was reversed in the example I gave, it was right in the code I compiled though. api_key or key both work, but I tried just key in case and it still didn't work.
As @sonnyyu suggested, the problem is with SSL certificates. Yun supports SSL but can't verify certificates without prior installing additional packages.
The quick workaround is to call noCheckSSL() before calling post