My code is working as expected on localhost starter kit but when I deployed it to development server my below code is taking around 2-3 mins and after that it says
Invalid URL
The requested URL "http://%5bNo%20Host%5d/index.html?", is invalid.
Reference #9.3d7c4117.1550338465.3d54af04
My code is as follows:
imagePath = "https://i.imgur.com/TrNzuMY.jpg";
Image image = null;
image = ImageIO.read( new URL(imagePath))
Is this something AEM on development server is not allowing to access external URLs? This is AEM 6.3 and this code is called in a JSP which is getting called by another JSP using AJAX GET request.
Edit (After Sumanta Pakira response): This is only happening when passed URL is Secure i.e. HTTPS, for HTTP URLs it is working as expected.