Skip to content

Commit 0565c78

Browse files
committed
[WiFiWebClientRepeating example] Change server and URL to avoid 301 response
1 parent 29fb495 commit 0565c78

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int status = WL_IDLE_STATUS;
2929
WiFiClient client;
3030

3131
// server address:
32-
char server[] = "www.arduino.cc";
32+
char server[] = "arduino.cc";
3333
//IPAddress server(64,131,82,241);
3434

3535
unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
@@ -95,8 +95,8 @@ void httpRequest() {
9595
if (client.connect(server, 80)) {
9696
Serial.println("connecting...");
9797
// send the HTTP PUT request:
98-
client.println("GET /latest.txt HTTP/1.1");
99-
client.println("Host: www.arduino.cc");
98+
client.println("GET /asciilogo.txt HTTP/1.1");
99+
client.println("Host: arduino.cc");
100100
client.println("User-Agent: ArduinoWiFi/1.1");
101101
client.println("Connection: close");
102102
client.println();
@@ -126,5 +126,3 @@ void printWifiStatus() {
126126
Serial.print(rssi);
127127
Serial.println(" dBm");
128128
}
129-
130-

0 commit comments

Comments
 (0)