# Trying to understand wifi client.println() http GET

**URL:** <https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026>\
**Category:** Networking, Protocols, and Devices\
**Created:** [November 23, 2024, 2:03pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026 "2024-11-23T14:03:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven\_lightfoot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/steven_lightfoot/32/905304_2.png) [@steven\_lightfoot](https://forum.arduino.cc/u/steven_lightfoot)\
**Post date:** [November 23, 2024, 2:03pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/1 "2024-11-23T14:03:46Z")

</div>

Hello,

I have been playing with my new Uno R4 wifi and trying to use the WiFiClient class client.println() method to get info from web pages, I have been following this code, and its works as written, with minor mods, for me:

[WiFi Web Client | Arduino Documentation](https://docs.arduino.cc/retired/library-examples/wifi-library/WiFiWebClient/)

My problems start when I try to deviate from using [google.com](http://google.com) as the main URL and 'arduino' as the query search. As written, the code basically retrieves byte by byte what the google search page returns as the results of the search. Its kind of useless and its too much data, but at least it works.

What I want to do, for now, is simply go to other simple homepages and get some basic data, even if its not especially meaningful, and I believe I need to use the http GET function, but its knowing what pages to go to, what data to get, and then how to form the GET request in proper syntax that is the issue. For now I dont want complex JSON data and API data from weather websites (for which I have examples), I just want simple info.

Can anyone advise on any good tutorials, with actual examples, of how to use GET in client.println() to get basic data with my Uno R4 wif acting as a web client?

Thanks, Steven Lightfoot

---

<div class="post-metadata">

**Author:** ![Juraj](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/juraj/32/238785_2.png) [@Juraj](https://forum.arduino.cc/u/Juraj)\
**Post date:** [November 23, 2024, 2:11pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/2 "2024-11-23T14:11:11Z")

</div>

use the ArduinoHttpClient library

---

<div class="post-metadata">

**Author:** ![steven\_lightfoot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/steven_lightfoot/32/905304_2.png) [@steven\_lightfoot](https://forum.arduino.cc/u/steven_lightfoot)\
**Post date:** [November 23, 2024, 2:42pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/3 "2024-11-23T14:42:40Z")

</div>

Thanks, very helpful, I never new such a thing existed. I will examine, and maybe comeback with questions, if you wouldn't mind.

---

<div class="post-metadata">

**Author:** ![kenb4](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kenb4](https://forum.arduino.cc/u/kenb4)\
**Post date:** [November 23, 2024, 9:10pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/4 "2024-11-23T21:10:45Z")

</div>

> [@](#):
>
> other simple homepages and get some basic data

Generally, there are no simple homepages any more. They're a bunch of HTML, maybe with a bunch of JavaScript, CSS, and/or images embedded in them.

> [@](#):
>
> For now I dont want complex JSON data and API data from weather websites (for which I have examples), I just want simple info.

How about simple JSON from an API? That would have a higher proportion of useful info that you might use on an Arduino. Try [https://mocktarget.apigee.net/help](https://mocktarget.apigee.net/help)

> [@](#):
>
> how to form the GET request in proper syntax

That part's easy. Even with an HTTP client, you pass the URL-path part, starting with a slash (after the `host:port`), as you've done already when manually performing HTTP with `println("GET /whatever?and_maybe=a_parameter&or=two")`. You use the same URL in a browser. It's all the other details that are complicated, like authentication/authorization -- aka "authN"

---

<div class="post-metadata">

**Author:** ![steven\_lightfoot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/steven_lightfoot/32/905304_2.png) [@steven\_lightfoot](https://forum.arduino.cc/u/steven_lightfoot)\
**Post date:** [November 23, 2024, 10:50pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/5 "2024-11-23T22:50:48Z")

</div>

Thanks, very helpful. Basically what has happened is I bought two R4 wifis and want them to talk to each other, and I realized I thus needed to learn all the Arduino wifi classes, and object methods (I didnt really even understand the differences between client and server!). So I have been going through them one by one. In looking at WiFiClient class and client.println() method I mostly understood the general code, but didnt recognize the stuff in the method arguments like GET etc, and then realized its an entirely different language (http), so for now I dont really want to get data I mostly want to practice the wifi class functions in Arduino, but I wanted something basic to work for the http. But given that the examples I am using are maybe ten years its possible websites are more complex and less easy to use with really simple examples.

Eventually I will come back and really learn how to get a client talking to web servers effectively , but I am not there yet.

Steve

---

<div class="post-metadata">

**Author:** ![Juraj](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/juraj/32/238785_2.png) [@Juraj](https://forum.arduino.cc/u/Juraj)\
**Post date:** [November 24, 2024, 9:15am UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/6 "2024-11-24T09:15:00Z")

</div>

don't use http for communication between two Arduino.

this applies for communication of two Uno R4 WiFi too:

> <https://arduino.stackexchange.com/questions/60819/esp8266-tcp-ip-communication/60821#60821>

---

<div class="post-metadata">

**Author:** ![steven\_lightfoot](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/steven_lightfoot/32/905304_2.png) [@steven\_lightfoot](https://forum.arduino.cc/u/steven_lightfoot)\
**Post date:** [November 24, 2024, 1:05pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/7 "2024-11-24T13:05:31Z")

</div>

Thanks, very helpful. I will check that out. I had the impression that I could communicate between the two Arduinos via my wifi network (i.e. going through the router) but I also have the impression (and I need to study this more) that I can also comm between the two ESP32 radios direct, and maybe even at longer distance!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 23, 2025, 1:06pm UTC](https://forum.arduino.cc/t/trying-to-understand-wifi-client-println-http-get/1325026/8 "2025-05-23T13:06:29Z")

</div>

Closed on May 23, 2025, 1:06pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
