I'm using Indy 10 in Delphi 7. I have a TidCookieManager in a main form and I wish to copy its cookies over to another cookie manager in a separate thread, this thread obviously has access to the main form.
How do I copy those cookies?
Thanks,
David
I'm using Indy 10 in Delphi 7. I have a TidCookieManager in a main form and I wish to copy its cookies over to another cookie manager in a separate thread, this thread obviously has access to the main form.
How do I copy those cookies?
Thanks,
David
Copyright © 2021 Jogjafile Inc.
TIdCookieManagerhas a publicCookieCollectionproperty of typeTIdCookieswhich provides access to the actual cookies. The cookies of oneTIdCookiescan be directly copied to anotherTIdCookiesvia itsAssign()orAddCookies()method, eg:Either way,
TIdCookiesis thread-safe, as it uses an internalTMultiReadExclusiveWriteSynchronizerduring read/write operations.