HTTPSecureSocket.GET is very slow

I use an API in one of my webapps, from which I get data over a HTTPSecureSocket.

If I open the requestURL in my browser or Postman, the request takes less than one second.

If I use the HTTPSecureSocket-Class in Xojo, the request takes 5 - 6 seconds.

This is my Code:
Dim req As New HTTPSecureSocket req.Secure = True req.ConnectionType = SSLSocket.TLSv12 Dim data As String data = req.Get("[URL OF THE API]", 30)

I tried to have an open instance of the HTTPS-Socket in the app or session object, but the request takes the same time.

What can I do?


Try using an async call instead by removing the timeout parameter and handling the returned data in the PageReceived event.

Using HTTPSecureSocket synchronously like this may result in other timing issues in the app too. For instance, the other sessions may be forced to wait for that response as well.