check if there is connection to server (1 Viewer)

irade92

Registered User.
Local time
Today, 11:52
Joined
Dec 26, 2010
Messages
229
In this example:

dim token as string
token = "&token=sEzwtdFW6v0VIq1c0jIeOzEDNS2xjy"

Dim req As New XMLHTTP60
Dim resp As New DOMDocument60

req.Open "GET", "https://api.insure.gov.rs/rest/" & token, False
req.send

resp.LoadXML req.responseText

....the question is How to check if it is valid token, because connection with the server depend on a valid token..I want to get a message if not connected to server
 

spikepl

Eledittingent Beliped
Local time
Today, 11:52
Joined
Nov 3, 2010
Messages
6,142
You need to google some, because the XMLHTTP60 request call returns a whole bunch of codes

And you need to google some more. It is possible to set the time-out period for an XMLHTTP60 request, so that you know that the thing timed out, and hence was unable to obtain response from the server within the time-out period specified by you.
 
Last edited:

irade92

Registered User.
Local time
Today, 11:52
Joined
Dec 26, 2010
Messages
229
You need to google some, because the XMLHTTP60 request call returns a whole bunch of codes

And you need to google some more. It is possible to set the time-out period for an XMLHTTP60 request, so that you know that the thing timed out, and hence was unable to obtain response from the server within the time-out period specified by you.

Thank you...
 

Users who are viewing this thread

Top Bottom