WebCookieList Function

Action

Lists all cookies out of the cookie database and writes them to the output file. This BDL function is implemented in WebAPI.bdh.

Include file

WebAPI.bdh

Syntax

WebCookieList(in nOptions : number optional);
Parameter Description
nOptions

(optional)

WEB_COOKIE_FLAG_DONT_FORCE_DOMAIN
Specifies that the domain of the cookie should only be included if it was originally specified when the cookie was entered into the cookie database.

Example

// This function shows how to list cookies stored
// in the cookie database
dclfunc
  function WebCookieList(nOptions : number optional)
  const MAX_COOKIE_BUF := 4096;
  var
    bCookie : boolean;
    sCookieBuffer : string(MAX_COOKIE_BUF);
  begin
    write("------ cookie database ------"); writeln;
    bCookie := WebCookieListFirst(sCookieBuffer, MAX_COOKIE_BUF, nOptions);
    while bCookie do
      write(sCookieBuffer); writeln;
      bCookie := WebCookieListNext(sCookieBuffer, MAX_COOKIE_BUF, nOptions);
    end;
  end WebCookieList;