Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function usandoHttpClient(DireccionUrl As String) As String
- Dim mihttp As New HttpClient
- Dim contenido As String
- Dim a As Integer = 0 'variable que nos sirve para no se exceda cierto tiempo en la descarga
- MiHttp.url = DireccionUrl
- MiHttp.Get()
- While (Lof(MiHttp) = False And a < 10)
- 'espero 1 segundo o que llegue a>10
- a = a + 1
- Wait 1
- Wend
- If a = 10 Or Lof(MiHttp) = False Then
- message("No ha sido posible conectarse al servidor \n No puedo comprobar si hay nueva versión")
- Return
- Endif
- If Lof(MiHttp) Then
- Read #MiHttp, contenido, Lof(MiHttp)
- End If
- Return contenido
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement