Using TRESTClient components I have added the ability of my app CW_EPG to access the SchedulesDirect.org JSON database under Windows 7 and higher, but running the app in Windows XP produces only the following error upon attempting to access the site: Error: REST request failed: Error sending data: (12007) The server name or address could not be resolved
. I've tried enabling/disabling various of the controls listed in the Object Inspector, but have not succeeded in changing that error message. Am I missing something or is this Rio subsystem just incompatible with XP?
FWIW, here's the relevant code segment (the base URL is set in Object Inspector for RESTClient1 to https://json.schedulesdirect.org/20141201
):
RESTRequest1.ClearBody;
RESTRequest1.AddBody('{"username":"' + userID
+ '", "password":"' + THashSHA1.GetHashString(userPass) +
'"}',ctTEXT_PLAIN);
RESTRequest1.Method := rmPOST;
RESTRequest1.Resource := 'token';
RESTResponse1.RootElement := '';
try
RESTRequest1.Execute;
except on E:Exception do
begin
ShowMessage('Error: ' + E.Message);
exit;
end;
end;