For an easier alternative to using these example, the [ESP8266HTTPClient library](https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266HTTPClient) can be used (which also supports HTTPS via a SHA1 fingerprint).
HTTPClient library supports https using a fingerprint (SHA1) which can be extracted from the browser. This hash is outdated and should be replaced at some point. For now it is the easiest way to do a HTTPS request. Another option might be using a [using CA certificate via the WiFiClientSecure library](https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/HTTPSRequestCACert/HTTPSRequestCACert.ino).