WifiClient - Prevent serial output
Posted: Thu Apr 21, 2016 2:55 pm
I have a NodeMCU - ESP12E DevKit V2 and Arduino IDE.
I can load and run the example sketch "BasicHTTPClient.ino". and read a webpage (or string of csv data in my case)
I am also successfuly passing this data back to another Arduino Mega over serial. This all works fine.
Here is a snippet of the code on the NodeMCU (arduino IDE):
The client.print command causes the http header to be written to the serial.
Question:
When i request the page with client.print, How can i prevent this header being output to serial?
Is there another client. command i can use?
Thanks for any comments and advise.
I can load and run the example sketch "BasicHTTPClient.ino". and read a webpage (or string of csv data in my case)
I am also successfuly passing this data back to another Arduino Mega over serial. This all works fine.
Here is a snippet of the code on the NodeMCU (arduino IDE):
Code: Select all
WiFiClient client;
..
..
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
The client.print command causes the http header to be written to the serial.
Code: Select all
Server: Snorkel/02.03.00.03
Date: Thu, 21 Apr 2016 13:29:04 GMT
Cache-Control: max-age=86400
Expires: Fri, 22 Apr 2016 13:45:05 GMT
Last-Modified: Mon, 22 Feb 201Etag: "56cab79a:0"
Content-Type: text/html;charset=utf-8
Connection: close
Content-Length: 57
Question:
When i request the page with client.print, How can i prevent this header being output to serial?
Is there another client. command i can use?
Thanks for any comments and advise.