Title: Cookies
Question: How to make add cookies?
Answer:
procedure TwebDispatcher.WebAction(Sender: TObject; Request: TWebRequest;
Response: TWebResponse; var Handled: Boolean);
begin
with (Response.Cookies.Add) do begin
Name := 'TESTNAME';
Value := 'TESTVALUE';
Secure := False;
Expires := Now;
Response.Cookies.WebResponse.SendResponse;
end;
end;
Anyone know how to make the the cookies expired? After you have added the cookies?