Feature/http client (#1973)

* Pass client parameter into two new begin() functions. Set other begin() functions deprecated. Updated library version to 1.2

* Added working HTTPS example on a public url with a certificate

* Remove two unnecessary tests in ::disconnect()

* Add a scoping block to BasicHttpsClient.ino to assure HTTPClient is destroyed before WiFiClientSecure

* Added check to handle mixup of old and present api properly

* Correct HTTPClient::setTimeout() to convert milliseconds to seconds. Correct WiFiClient::setTimeout() to call Stream::setTimeout() with seconds converted back to milliseconds. Remove inproper checks for _insecure.

* Added small comment because it looked like the Travis build did not finish
This commit is contained in:
Jeroen88
2018-11-19 16:57:23 +01:00
committed by Me No Dev
parent b70737d276
commit 01d22c8807
5 changed files with 351 additions and 51 deletions

View File

@ -240,6 +240,7 @@ int WiFiClient::setSocketOption(int option, char* value, size_t len)
int WiFiClient::setTimeout(uint32_t seconds)
{
Client::setTimeout(seconds * 1000);
struct timeval tv;
tv.tv_sec = seconds;
tv.tv_usec = 0;