I have the programm code like this
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
//
var ScHttpWebRequest: TScHttpWebRequest:= TScHttpWebRequest.Create(nil);
try
ScHttpWebRequest.RequestUri:= 'https://<my_site_url>/getnewstest.php';
ScHttpWebRequest.Method:= rmPost;
ScHttpWebRequest.ContentType := 'application/x-www-form-urlencoded';
var postdata: string := 'UserID=8247cf45495e65fa5d4c2dc587336e6c';
var Buf: TBytes := TEncoding.UTF8.GetBytes((postdata));
ScHttpWebRequest.ContentLength := Length(Buf);
ScHttpWebRequest.WriteBuffer(Buf);
var httpWebResponse: TScHttpWebResponse:= ScHttpWebRequest.GetResponse();
var Response: string:= httpWebResponse.ReadAsString;
finally
ScHttpWebRequest.Free;
end;
end;
But after update certificate I get exception
---------------------------
Debugger Exception Notification
---------------------------
Project SEB_Test.exe raised exception class EScAlertError with message 'The certificate is not within its validity period'.
---------------------------
Break Continue Help
---------------------------
When I enter this URL (https://<my_site_url>/getnewstest.php) into my browser I have no any warnings or exceptions.
So, I think my certificate is correct.
Thanks for all your help.