Download png with HttpSecureSocket not working

I’m having a really senior moment. Why isn’t the following code working?

[code]dim s as string = “https://image-assets.stackcommerce.com/uploaded_screenshot_1s/6507/medium_limefuel020kmf1.png

Dim secureSite As New HTTPSecureSocket
secureSite.Secure = True
secureSite.ConnectionType = SSLSocket.TLSv12
Dim data As String = secureSite.Get(s, 30)[/code]

“data” doesn’t contain any data. The url is correct and shows some marketing image.

From what I read from httpSocket.

' Picture.FromData creates a new picture from raw binary data Dim p As Picture = Picture.FromData(data)
EDIT
I have try the url you have above and I get 102 response

[code]'dim s as string = “https://image-assets.stackcommerce.com/uploaded_screenshot_1s/6507/medium_limefuel020kmf1.png
dim s as string = “https://apostagma.eu/wp-content/uploads/2018/05/5011026108163.png” //<SSL with comodo and working

Dim secureSite As New HTTPSecureSocket
secureSite.Secure = True
secureSite.ConnectionType = SSLSocket.TLSv12
Dim data As String = secureSite.Get(s, 30)

If secureSite.HTTPStatusCode = 200 Then ’ OK
’ Picture.FromData creates a new picture from raw binary data
Dim p As Picture = Picture.FromData(data)

If p <> Nil Then
ImageWell1.Image = p
Else
MsgBox(“Not a picture.”)
End If

Else ’ errors, redirects, etc.
MsgBox("HTTP Status: " + Str(secureSite.HTTPStatusCode))

End If[/code]

Check secureSite.HTTPStatusCode after calling the Get method.

Thanks, Loannis and Greg, for the tips. I may need to pick a newer marketing mail for testing.

Assuming the status code is correct, 102 means “processing” which means that the server thinks it’s going to take some time to respond. Sometimes, the right answer is to wait a little bit and make the request again.

Does the namespaced framework HTTPSocket handle this better?

Hadn’t wanted to test the new HTTPSocket because I need synchronous mode and no async. I suppose I can have a look tomorrow.

I have success with your URL with class.
example