Dim secSocket As New HTTPSecureSocket
secSocket.Yield = True
secSocket.Secure = True
//secSocket.ConnectionType = SSLSocket.SSLv3
Dim data As String
data = secSocket.Get("https://soundcloud.com", 10)
break
Anyone knows why no data is returned by the socket? For some https sites, it works as expected. But for a few of them, like the one I use in the above example, it doesn’t. Investigating the socket, LastErrorCode = 102.
You probably need to set the right Type of connection which is why soundcloud rejects SSLv3 immediately
Try one of the TLS based ones (I’d start with TLS 1.2 )
There could be a LOT of other factors
Soundcloud might reject requests that have no known user agent or some other missing header
Hard to guess at what it is
[quote=333592:@Norman Palardy]There could be a LOT of other factors
Soundcloud might reject requests that have no known user agent or some other missing header
Hard to guess at what it is[/quote]
Tried adding an user-agent to the socket
secSocket.SetRequestHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"). So far, no luck
beside the ConnectionType, a common problem with the classic HTTPSecureSocket is that it does not support the Server Name Indication (SNI) Extension which some Servers require. In that cases either no connection can be established, or they give an HTTP 403. A solution can be to use the new framework’s HTTPSocket. See <https://xojo.com/issue/46495>
@ Greg I was going after the quote button instead I missed click the this is my answer one. Sorry about that.
The thing is, I did increase the timeout to even 60 and nothing.
I will check the new HTTPSSocket and see if that may solve the issue.
[quote=333686:@Christian Schmitz]I can always suggest CURL as alternative via plugin.
Can be used in socket mode with all SSL options and give debug log.[/quote]
Funny thing. I tried the MBC curl class and it worked. It’s just that I was hoping to be able to solve it using the xojo socket because I only need it once.