The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client?
Https almost always implies a different port being used (standard http=>80; standard https=>443). You have a hardcoded port (8151). I’m guessing the https servlet is listening on a different port.
Hardcode HTTPS port number after the url.
private static final String URL = “https://www.blah.com:443”;