HTTPS GET request working on esp32 but not on esp8266
I ended up using

ESP8266WiFi.h

instead of

ESP8266WiFiMulti.h

This fixed both my original code and the basic HTTPS example. I still don't understand what difference it made though.