electronicsguy / ESP8266

ESP8266 Projects
242 stars 183 forks source link

client.printRedir #49

Closed DarkShadowNight closed 6 years ago

DarkShadowNight commented 6 years ago

Hello,

Wonderful library to post data to Google Sheets, but following method to put data is more clear to me how it works: http://embedded-lab.com/blog/post-data-google-sheets-using-esp8266/

I don't understand the following call in the above program: client.printRedir(urlFinal, host, googleRedirHost);

Your printRedir is a void, how are these arguments are passed and processed? It does not work. I searched in the history if you might changed this, but I can't find the right answer.

Sorry I ask you, but have not found the answer somewhere else how this works and what this function does. I was thinking it is splitted now and printRedir is just for putting debug output, To put the data has to be done with another function?

Thanks is advance

electronicsguy commented 6 years ago

The post on that website has not been updated for the latest version of the library. Ver 2 uses a slightly diffent API, which is more intuitive. Please see the example as explained in the Readme.

You now need to use "client->GET()" or "client->POST()" as explained in the Readme and the example.

DarkShadowNight commented 6 years ago

Thanks for your fast reply, i will try it.

I had the impression it has to do something with the GET function. I set the disp to 1 but did not see any output to the serial, what I did not expect. bool GET(const String& url, const char* host, const bool& disp);

PS: How is the fingerprint working, I generated it according the documentation but always mismatch. With spaces / without spaces, ... ?

electronicsguy commented 6 years ago

@DarkShadowNight Please read through the Readme for links which explain about the fingerprint. You have to generate the fingerprint from the exact geo-location where your esp8266 is located - same wifi network, etc. Is that what you're doing? Plus you've to generate a new one every few days or so. It's explained in there.