# Using ArduinoHttpClient lib with ESP32

**URL:** <https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455>\
**Category:** Networking, Protocols, and Devices\
**Created:** [September 5, 2021, 1:59pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455 "2021-09-05T13:59:23Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 5, 2021, 1:59pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/1 "2021-09-05T13:59:23Z")

</div>

I asked about a minimum working code example of the [ArduinoHttpClient library](https://github.com/arduino-libraries/ArduinoHttpClient) for the ESP32 (see also: [minimal example for ESP32 · Issue #111 · arduino-libraries/ArduinoHttpClient · GitHub](https://github.com/arduino-libraries/ArduinoHttpClient/issues/111)).

In the meantime I tried this ...

```cpp
#include <Arduino.h>

#include <ArduinoHttpClient.h>

#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;

WiFiClient wifi;
HttpClient http(wifi,"arduino.cc",80);

void setup() {
  Serial.begin(115200);
  wifiMulti.addAP("your-ssid","your-pw");
  
  // attempt to connect to WiFi
  Serial.print("Connecting to Wifi ... ");
  while (wifiMulti.run() != WL_CONNECTED) {
    // unsuccessful, retry in 4 seconds
    Serial.print("failed ... ");
    delay(4000);
    Serial.print("retrying ... ");
  }
  Serial.println("WiFi connected");
}

void loop() {
  Serial.println("making GET request");
  http.get("/");

  // read the status code and body of the response
  int statusCode = http.responseStatusCode();
  String response = http.responseBody();

  Serial.print("Status code: ");
  Serial.println(statusCode);
  Serial.print("Response: ");
  Serial.println(response);
  Serial.println("Wait five seconds");
  delay(5000);
}

```

but it stalls after

```cpp
Connecting to Wifi ... WiFi connected
making GET request
Status code: -3
Response: 
Wait five seconds

```

Is the [WiFi - Arduino Reference](https://www.arduino.cc/en/Reference/WiFiClient) used in the ArduinoHttpClient lib not compatible with the ESP32 implementaton (e.g. used in [arduino-esp32/WiFiClient.ino at master · espressif/arduino-esp32 · GitHub](https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClient/WiFiClient.ino))?

`WiFiClient client;` is called in `loop()` in the ESP32 / espressif example while `WiFiClient wifi;` is called already before setup in [ArduinoHttpClient/SimpleGet.ino at master · arduino-libraries/ArduinoHttpClient · GitHub](https://github.com/arduino-libraries/ArduinoHttpClient/blob/master/examples/SimpleGet/SimpleGet.ino) ?? Is it perhaps the same syntax but different functions?

How can I get working the ArduinoHttpClient library with an ESP32? Any chance?

---

<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:** [September 5, 2021, 3:29pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/2 "2021-09-05T15:29:11Z")

</div>

esp32 has own HTTPClient library. see the examples in the Examples menu

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 5, 2021, 4:02pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/3 "2021-09-05T16:02:21Z")

</div>

Yes, I know that the Arduino ESP32 core comes with his own HTTPClient library. But I want to use the TTGO T-Call, a SIM800 equiped ESP and use GPRS or WiFi, best with as much common code for both GPRS and WiFi. So the idea is to make the TCP connection separate only (different for WiFi vs. GPRS) and then use the same code (and lib) for the HTTP stuff.

---

<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:** [September 5, 2021, 5:23pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/4 "2021-09-05T17:23:53Z")

</div>

I understand.  
try ` http.get("/asciilogo.txt");`. I think it is the only url accessible at port 80 an arduino.cc

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 6, 2021, 1:31am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/5 "2021-09-06T01:31:09Z")

</div>

You are right `/` on `arduino.cc:80` throws an 301

```cpp
# http arduino.cc:80/
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Length: 184
Content-Type: text/html
Date: Mon, 06 Sep 2021 01:24:56 GMT

```

`arduino.cc:80/asciilogo.txt` is better for testing and returns a valid 200 on the shell

```cpp
# http arduino.cc:80/asciilogo.txt
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/plain
Date: Mon, 06 Sep 2021 01:23:39 GMT

```

But unfortunately the same error with the sketch:

```cpp
Connecting to Wifi ... WiFi connected
making GET request
Status code: -3
Response: 
Wait five seconds
making GET request

```

---

<div class="post-metadata">

**Author:** ![khoih-prog](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@khoih-prog](https://forum.arduino.cc/u/khoih-prog)\
**Post date:** [September 6, 2021, 4:32am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/6 "2021-09-06T04:32:22Z")

</div>

You can try my [**WiFiWebServer** Library](https://github.com/khoih-prog/WiFiWebServer), where the Arduino HTTPClient library was merged. ESP32/ESP8266 using WiFi are also supported.

For example, this [**SimpleHTTPExample** example](https://github.com/khoih-prog/WiFiWebServer/tree/master/examples/HTTPClient/SimpleHTTPExample)

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 6, 2021, 7:40pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/7 "2021-09-06T19:40:17Z")

</div>

I have installed your WiFiWebServer lib via the lib manage in the Arduino IDE. Board detection is done by the board name in case I see this correct. I'm using the TTGO T-Call as "ESP32 Dev Module" with nothing changed in the SimpleHTTPExample I get:

```cpp
21:32:39.876 -> Starting SimpleHTTPExample on ESP32_DEV with ESP WiFi using WiFi Library
21:32:39.876 -> WiFiWebServer v1.3.0
21:32:39.876 -> WiFi shield not present

```

Do I have to configue something or what could be the reason it doesn't work. btw. I have only installed WiFiWebServer and your C+ extension lib.

---

<div class="post-metadata">

**Author:** ![khoih-prog](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@khoih-prog](https://forum.arduino.cc/u/khoih-prog)\
**Post date:** [September 6, 2021, 7:56pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/8 "2021-09-06T19:56:19Z")

</div>

Sorry I haven't modified the code in HTTPClient to work with ESP32, as I didn't expect ESP32 users would use this.

Please change the code's `setup()` temporarily to

```cpp
void setup()
{
  Serial.begin(115200);
  while (!Serial);

  Serial.print(F("\nStarting SimpleHTTPExample on "));
  Serial.print(BOARD_NAME);
  Serial.print(F(" with "));
  Serial.println(SHIELD_TYPE); 
  Serial.println(WIFI_WEBSERVER_VERSION);

#if WIFI_USING_ESP_AT

  // initialize serial for ESP module
  EspSerial.begin(115200);
  // initialize ESP module
  WiFi.init(&EspSerial);

  Serial.println(F("WiFi shield init done"));
  
#endif

#if !(ESP32 || ESP8266)
  
  // check for the presence of the shield
  #if USE_WIFI_NINA
    if (WiFi.status() == WL_NO_MODULE)
  #else
    if (WiFi.status() == WL_NO_SHIELD)
  #endif
    {
      Serial.println(F("WiFi shield not present"));
      // don't continue
      while (true);
    }

  #if USE_WIFI_NINA
    String fv = WiFi.firmwareVersion();
    
    if (fv < WIFI_FIRMWARE_LATEST_VERSION)
    {
      Serial.println(F("Please upgrade the firmware"));
    }
  #endif
  
#endif

  Serial.print(F("Connecting to SSID: "));
  Serial.println(ssid);
  
  status = WiFi.begin(ssid, pass);

  delay(1000);
   
  // attempt to connect to WiFi network
  while ( status != WL_CONNECTED)
  {
    delay(500);
        
    // Connect to WPA/WPA2 network
    status = WiFi.status();
  }

  // you're connected now, so print out the data
  printWifiStatus();
}

```

then you'll get this on the terminal

````cpp
Starting SimpleHTTPExample on ESP32_DEV with ESP WiFi using WiFi Library
WiFiWebServer v1.3.0
Connecting to SSID: HueNet1
You're connected to the network, IP = 192.168.2.80
SSID: HueNet1, Signal strength (RSSI):-28 dBm
startedRequest ok
Got status code: 200
Content length is: 2263

Body returned follows:

           `:;;;,` .:;;:.           
        .;;;;;;;;;;;` :;;;;;;;;;;: TM 
      `;;;;;;;;;;;;;;;` :;;;;;;;;;;;;;;;      
     :;;;;;;;;;;;;;;;;;; `;;;;;;;;;;;;;;;;;;     
    ;;;;;;;;;;;;;;;;;;;;; .;;;;;;;;;;;;;;;;;;;;    
   ;;;;;;;;:` `;;;;;;;;; ,;;;;;;;;.` .;;;;;;;;   
  .;;;;;;, :;;;;;;; .;;;;;;; ;;;;;;;  
  ;;;;;; ;;;;;;; ;;;;;;, ;;;;;;. 
 ,;;;;; ;;;;;;.;;;;;;` ;;;;;; 
 ;;;;;. ;;;;;;;;;;;` ``` ;;;;;`
 ;;;;; ;;;;;;;;;, ;;; .;;;;;
`;;;;: `;;;;;;;; ;;; ;;;;;
,;;;;` `,,,,,,,, ;;;;;;; .,,;;;,,, ;;;;;
:;;;;` .;;;;;;;; ;;;;;, :;;;;;;;; ;;;;;
:;;;;` .;;;;;;;; `;;;;;; :;;;;;;;; ;;;;;
.;;;;. ;;;;;;;. ;;; ;;;;;
 ;;;;; ;;;;;;;;; ;;; ;;;;;
 ;;;;; .;;;;;;;;;; ;;; ;;;;;,
 ;;;;;; `;;;;;;;;;;;; ;;;;; 
 `;;;;;, .;;;;;; ;;;;;;; ;;;;;; 
  ;;;;;;: :;;;;;;. ;;;;;;; ;;;;;;  
   ;;;;;;;` .;;;;;;;, ;;;;;;;; ;;;;;;;:  
    ;;;;;;;;;:,:;;;;;;;;;: ;;;;;;;;;;:,;;;;;;;;;;   
    `;;;;;;;;;;;;;;;;;;;. ;;;;;;;;;;;;;;;;;;;;    
      ;;;;;;;;;;;;;;;;; :;;;;;;;;;;;;;;;;:     
       ,;;;;;;;;;;;;;, ;;;;;;;;;;;;;;       
         .;;;;;;;;;` ,;;;;;;;;:         
                                                         
                                                         
                                                         
                                                         
    ;;; ;;;;;` ;;;;: .;; ;; ,;;;;;, ;;. `;, ;;;;   
    ;;; ;;:;;; ;;;;;; .;; ;; ,;;;;;: ;;; `;, ;;;:;;  
   ,;:; ;; ;; ;; ;; .;; ;; ,;, ;;;,`;, ;; ;;  
   ;; ;: ;; ;; ;; ;; .;; ;; ,;, ;;;;`;, ;; ;;. 
   ;: ;; ;;;;;: ;; ;; .;; ;; ,;, ;;`;;;, ;; ;;` 
  ,;;;;; ;;`;; ;; ;; .;; ;; ,;, ;; ;;;, ;; ;;  
  ;; ,;, ;; .;; ;;;;;: ;;;;;: ,;;;;;: ;; ;;, ;;;;;;  
  ;; ;; ;; ;;` ;;;;. `;;;: ,;;;;;, ;; ;;, ;;;;   

````

---

<div class="post-metadata">

**Author:** ![khoih-prog](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@khoih-prog](https://forum.arduino.cc/u/khoih-prog)\
**Post date:** [September 6, 2021, 11:02pm UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/9 "2021-09-06T23:02:30Z")

</div>

Hi @Clemens

I just released a new [**WiFiWebServer** releases v1.3.1](https://github.com/khoih-prog/WiFiWebServer/releases/tag/v1.3.1) to add support to ESP32/ESP8266.

Enjoy,

* * *

### Releases v1.3.1

1. Add support to ESP32/ESP8266 to use in **some rare use-cases**
2. Update `Packages' Patches`
3. Split `changelog.md` from `README.md`

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 7, 2021, 12:11am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/10 "2021-09-07T00:11:48Z")

</div>

I was able to make a connection via WiFi with the "original" WiFiClientBasic sketch: [arduino-esp32/WiFiClientBasic.ino at master · espressif/arduino-esp32 · GitHub](https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClientBasic/WiFiClientBasic.ino)

Now I updated to your WiFiWebServer v1.3.1 version and opened the SimpleHTTPExample sketch, added my Wifi credentials on the bottom of the page in `defines.h`. Unfortunately it is not working.

```cpp
Starting SimpleHTTPExample on ESP32_DEV with ESP WiFi using WiFi Library
WiFiWebServer v1.3.1
Connecting to SSID: MyWiFi
You're connected to the network, IP = 192.168.179.6
SSID: MyWiFi, Signal strength (RSSI):-68 dBm
startedRequest ok
Getting response failed: -3

```

I got a guru meditation also:

```cpp
You're connected to the network, IP = 192.168.179.6
SSID: MyWiFi, Signal strength (RSSI):-64 dBm
making GET request
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d1120 PS : 0x00060c30 A0 : 0x800d11e8 A1 : 0x3ffb1ea0  
A2 : 0x00000000 A3 : 0x3ffb1eef A4 : 0x00000001 A5 : 0x00000001  
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000  
A10 : 0x000000bf A11 : 0x00000001 A12 : 0x00000050 A13 : 0x3ffb1e84  
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000008 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff  

ELF file SHA256: 0000000000000000

Backtrace: 0x400d1120:0x3ffb1ea0 0x400d11e5:0x3ffb1ec0 0x4013feda:0x3ffb1ee0 0x4013fe05:0x3ffb1f10 0x400d2771:0x3ffb1f30 0x400d0dae:0x3ffb1f50 0x400d0716:0x3ffb1f80 0x400d2c0d:0x3ffb1fb0 0x40089792:0x3ffb1fd0

Rebooting...

```

After the trial with the ESP32 / TTGO T-Call, I tested the same code with an Arduino Nano 33 IoT and got the same `response failed: -3`

Any idea what could going on / wrong?

---

<div class="post-metadata">

**Author:** ![khoih-prog](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@khoih-prog](https://forum.arduino.cc/u/khoih-prog)\
**Post date:** [September 7, 2021, 4:33am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/11 "2021-09-07T04:33:18Z")

</div>

Very strange as I'm running my board here OK using the latest **v1.3.1** , with Arduino IDE **1.8.15** , ESP32 core **v2.0.0**.

````cpp
Starting SimpleHTTPExample on ESP32_DEV with ESP WiFi using WiFi Library
WiFiWebServer v1.3.1
Connecting to SSID: HueNet1
You're connected to the network, IP = 192.168.2.80
SSID: HueNet1, Signal strength (RSSI):-28 dBm
startedRequest ok
Got status code: 200
Content length is: 2263

Body returned follows:

           `:;;;,` .:;;:.           
        .;;;;;;;;;;;` :;;;;;;;;;;: TM 
      `;;;;;;;;;;;;;;;` :;;;;;;;;;;;;;;;      
     :;;;;;;;;;;;;;;;;;; `;;;;;;;;;;;;;;;;;;     
    ;;;;;;;;;;;;;;;;;;;;; .;;;;;;;;;;;;;;;;;;;;    
   ;;;;;;;;:` `;;;;;;;;; ,;;;;;;;;.` .;;;;;;;;   
  .;;;;;;, :;;;;;;; .;;;;;;; ;;;;;;;  
  ;;;;;; ;;;;;;; ;;;;;;, ;;;;;;. 
 ,;;;;; ;;;;;;.;;;;;;` ;;;;;; 
 ;;;;;. ;;;;;;;;;;;` ``` ;;;;;`
 ;;;;; ;;;;;;;;;, ;;; .;;;;;
`;;;;: `;;;;;;;; ;;; ;;;;;
,;;;;` `,,,,,,,, ;;;;;;; .,,;;;,,, ;;;;;
:;;;;` .;;;;;;;; ;;;;;, :;;;;;;;; ;;;;;
:;;;;` .;;;;;;;; `;;;;;; :;;;;;;;; ;;;;;
.;;;;. ;;;;;;;. ;;; ;;;;;
 ;;;;; ;;;;;;;;; ;;; ;;;;;
 ;;;;; .;;;;;;;;;; ;;; ;;;;;,
 ;;;;;; `;;;;;;;;;;;; ;;;;; 
 `;;;;;, .;;;;;; ;;;;;;; ;;;;;; 
  ;;;;;;: :;;;;;;. ;;;;;;; ;;;;;;  
   ;;;;;;;` .;;;;;;;, ;;;;;;;; ;;;;;;;:  
    ;;;;;;;;;:,:;;;;;;;;;: ;;;;;;;;;;:,;;;;;;;;;;   
    `;;;;;;;;;;;;;;;;;;;. ;;;;;;;;;;;;;;;;;;;;    
      ;;;;;;;;;;;;;;;;; :;;;;;;;;;;;;;;;;:     
       ,;;;;;;;;;;;;;, ;;;;;;;;;;;;;;       
         .;;;;;;;;;` ,;;;;;;;;:         
                                                         
                                                         
                                                         
                                                         
    ;;; ;;;;;` ;;;;: .;; ;; ,;;;;;, ;;. `;, ;;;;   
    ;;; ;;:;;; ;;;;;; .;; ;; ,;;;;;: ;;; `;, ;;;:;;  
   ,;:; ;; ;; ;; ;; .;; ;; ,;, ;;;,`;, ;; ;;  
   ;; ;: ;; ;; ;; ;; .;; ;; ,;, ;;;;`;, ;; ;;. 
   ;: ;; ;;;;;: ;; ;; .;; ;; ,;, ;;`;;;, ;; ;;` 
  ,;;;;; ;;`;; ;; ;; .;; ;; ,;, ;; ;;;, ;; ;;  
  ;; ,;, ;; .;; ;;;;;: ;;;;;: ,;;;;;: ;; ;;, ;;;;;;  
  ;; ;; ;; ;;` ;;;;. `;;;: ,;;;;;, ;; ;;, ;;;;   

````

Be sure to select the same settings in IDE

 ![Selection_027](https://europe1.discourse-cdn.com/arduino/original/4X/4/c/a/4ca952f6fee85dae0f3d48e750c8f21b16daaf4c.png)

If you still have issue with this library, I suggest you post an issue on [**WiFiWebServer**](https://github.com/khoih-prog/WiFiWebServer/issues)

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 7, 2021, 7:32am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/12 "2021-09-07T07:32:08Z")

</div>

Many thanks for your detailed setting description. I fear that's the right road! Same lib and IDE version here but 1.0.x ESP core. I used an old board manager URL for ESP32 ([https://dl.espressif.com/dl/package\_esp32\_index.json](https://dl.espressif.com/dl/package_esp32_index.json)) so ony 1.x versions showed up and no 2.x version was offered. I changed this now to [https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package\_esp32\_index.json](https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json) so the 2.x versions are available and updated my system.

My sketch in the initial posting isn't still working and with the SimpleHTTPExample in your lib is runnig now I get

```cpp
Starting SimpleHTTPExample on ESP32_DEV with ESP WiFi using WiFi Library
WiFiWebServer v1.3.1
Connecting to SSID: MyWiFi
You're connected to the network, IP = 192.168.179.9
SSID: MyWiFi, Signal strength (RSSI):-58 dBm
startedRequest ok
Getting response failed: -3

```

Btw this is my compiling output:

```cpp
In file included from C:\Users\mail\temporaer\SimpleHTTPExample-mod\SimpleHTTPExample-mod.ino:13:
C:\Users\mail\temporaer\SimpleHTTPExample-mod\defines.h:78:4: warning: #warning Using ESP WiFi with WiFi Library [-Wcpp]
   #warning Using ESP WiFi with WiFi Library
    ^ ~~~~~~
C:\Users\mail\temporaer\SimpleHTTPExample-mod\defines.h:328:4: warning: #warning ESP32 board selected [-Wcpp]
   #warning ESP32 board selected
    ^ ~~~~~~
In file included from C:\Users\mail\temporaer\SimpleHTTPExample-mod\defines.h:348,
                 from C:\Users\mail\temporaer\SimpleHTTPExample-mod\SimpleHTTPExample-mod.ino:13:
C:\Users\mail\Documents\Arduino\libraries\WiFiWebServer\src/WiFiWebServer.h:124:4: warning: #warning Use WiFi.h from WiFiWebServer [-Wcpp]
   #warning Use WiFi.h from WiFiWebServer
    ^ ~~~~~~
In file included from C:\Users\mail\temporaer\SimpleHTTPExample-mod\defines.h:348,
                 from C:\Users\mail\temporaer\SimpleHTTPExample-mod\SimpleHTTPExample-mod.ino:13:
C:\Users\mail\Documents\Arduino\libraries\WiFiWebServer\src/WiFiWebServer.h:142:4: warning: #warning SENDCONTENT_P_BUFFER_SZ using default 4 Kbytes [-Wcpp]
   #warning SENDCONTENT_P_BUFFER_SZ using default 4 Kbytes
    ^ ~~~~~~

```

---

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.arduino.cc/u/Clemens)\
**Post date:** [September 7, 2021, 8:22am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/13 "2021-09-07T08:22:38Z")

</div>

In the end it is running, also my initial sketch (posting #1). 🙃 I switch to an other WiFi network -- what I have done yesterday already for testing, but without success -- and today there it is working! I couldn't nail it down to the exact reason but

- a "\_" in the SSID?, no SSIDs with special character as "\_" working
- router \<-\> repeater issue?, direct connection to router (no wifi repeater) does not solve the issue
- 2,4 GHz and 5 GHz WiFi with the same SSID?
- restricted "guest" network?

Now I'm getting on

> Connecting to Wifi ... failed ... retrying ... failed ... retrying ... failed ...

on the non-working WiFi-network / SSID

but after a while also

```arduino
Connecting to Wifi ... failed ... retrying ... failed ... retrying ... failed ... retrying ... failed ... retrying ... WiFi connected
making GET request
Status code: -3
Response:

```

But it is still interesting that the network / SSID worked with the "original" WiFiClientBasic

> [@Clemens](#):
>
> I was able to make a connection via WiFi with the "original" WiFiClientBasic sketch: [arduino-esp32/libraries/WiFi/examples/WiFiClientBasic/WiFiClientBasic.ino at master · espressif/arduino-esp32 · GitHub](https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClientBasic/WiFiClientBasic.ino)

---

<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:** [January 5, 2022, 8:22am UTC](https://forum.arduino.cc/t/using-arduinohttpclient-lib-with-esp32/902455/14 "2022-01-05T08:22:42Z")

</div>

Closed on January 5, 2022, 8:22am UTC

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