Closed HowardPWardinkle closed 7 years ago
Hi @JimWatV1,
Could you please share a URL (and entire sketch that causes issues)?
For the google result sample, I get the following which is the whole page:
Starting connection to server...
connected to server
HTTP/1.1 302 Found
Location: http://www.google.ca/search?q=arduino&gws_rd=cr&ei=W2w3WPezPMHgjwSgrq-gCw
Cache-Control: private
Content-Type: text/html; charset=UTF-8
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info."
Date: Thu, 24 Nov 2016 22:40:27 GMT
Server: gws
Content-Length: 278
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID=91=zs-DnN3FdI3FqVgTpgiWtokBbQfbRLMLNHktnz9fUNiqG8KSILGCIkQUer1TuUB04kRFoaC2xsiEdj3gDUGR-V37rRoGmcYPU-emwC_Zf2G8NxnihxSCnl9T4K20x6l0; expires=Fri, 26-May-2017 22:40:27 GMT; path=/; domain=.google.com; HttpOnly
Connection: close
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.ca/search?q=arduino&gws_rd=cr&ei=W2w3WPezPMHgjwSgrq-gCw">here</A>.
</BODY></HTML>
disconnecting from server.
Thanks for the reply. You are getting a 302 to redirect. Try a link that doesn’t redirect (gets http 200)
I’ve attached the ino I used. It’s the sample with the one line added, per Adafruit:
WiFi.setPins(8,7,4,2);
When running it here’s what I get back: If you hit www.google.com/search?q=arduinohttp://www.google.com/search?q=arduino with Postman or ARC and get a 200 result, you’ll get back much more data. Notice no closing
or
I have the Feather M0 IoT kit and it works fine for the temp/humidity sample. I tried to use the WiFi101->WiFiWebClient sample and it connects to Wifi ok and gets part of the page, but not the entire page. It will get 3-7K of the google result in the sample. Not a consistent number of bytes. (I did call SetPins per Adafruit's doc at https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/using-the-wifi-module)
I tried reading data after disconnect and removing Serial.write and I could get more data, but never the full page. I tried other web pages with same results, partial data. Any ideas on getting the sample to work?