user40661: I'm using a NodeMCU, which is connected to an enterprise network at a school. The information given in the GET requests that the ESP8266 sends is sensitive, so naturally we want to make it secure and encrypted - enter SSL. We do the request like so;
HTTPClient http.begin(url, thumbprint)
However, on the network at the school, doing this request fails 90% of the time, so I did a few tests - 100 requests to the exact same IP and certificate, noting how many went through;

School network

HTTPS requests: 10/100 successful [10%]
HTTP requests: 100/100 successful [100%]

Private home network

HTTPS requests: 100/100 successful [100%]
HTTP requests: 100/100 successful [100%]


We have also tried using the WiFiClient class, and while 100% of the requests went through, each one took 15 seconds which is too long.
My question is; what would the problem be, and what can we do to fix it? Can I do something in the code, or on the network?

user337: Increase the timeout for your request with HTTPClient.setTimeout(). Note the timeout is in milliseconds.
HTTPClient http;
http.setTimeout(15000); // 15 Seconds
http.begin(url, thumbprint);


40661: <p>I'm using a NodeMCU, which is connected to an enterprise network at a school. The information given in the GET requests that the ESP8266 sends is sensitive, so naturally we want to make it secure and encrypted - enter SSL. We do the request like so;</p>

<p><code>HTTPClient http.begin(url, thumbprint)</code></p>

<p>However, on the network at the school, doing this request fails 90% of the time, so I did a few tests - 100 requests to the exact same IP and certificate, noting how many went through;</p>

<ul>
<li><strong>School network</strong>

<ul>
<li>HTTP<strong>S</strong> requests: 10/100 successful <strong>[10%]</strong></li>
<li>HTTP requests: 100/100 successful <strong>[100%]</strong></li>
</ul></li>
<li><strong>Private home network</strong>

<ul>
<li>HTTP<strong>S</strong> requests: 100/100 successful <strong>[100%]</strong></li>
<li>HTTP requests: 100/100 successful <strong>[100%]</strong></li>
</ul></li>
</ul>

<p>We have also tried using the <code>WiFiClient</code> class, and while 100% of the requests went through, each one took 15 seconds which is too long.</p>

<p>My question is; what would the problem be, and what can we do to fix it? Can I do something in the code, or on the network?</p>
 337: <p>Increase the timeout for your request with <code>HTTPClient.setTimeout()</code>. Note the timeout is in milliseconds.</p>

<pre><code>HTTPClient http;
http.setTimeout(15000); // 15 Seconds
http.begin(url, thumbprint);
</code></pre>
