Module Cookies allows the programmer to perform some basic operations on the HTTP cookie database. The cookie database contain client-side state that web servers have requested WebL to store for them. By default the cookie database starts out empty with each WebL run, and fills up as cookies are set. At the end of the run, the cookie database is discarded. This is the default WebL behavior, and no programmer action is required. Note that the cookie database is shared by all threads and requests of the WebL process.
The contents of the cookie database can be subsumed by specifying a non-nil "Cookie" header field as part of the GetURL and PostURL functions. Furthermore, the Save and Load functions of the Cookie module can be used to save the database to a file, and later load it again. These functions are required if the cookie database is to transcend a single WebL session.
The external file format of the cookie database is a line per cookie, where each cookie is stored in the same format as received in the "Set-cookie" HTTP header. More details about the HTTP Set-cookie header can be found in the cookie specification from Netscape.