async function handleRequest(request) {
  //we have not stored cookie yet
  if (typeof cookieSite === "undefined") {
    res = await callWeb(address);
    urls = res.variants;
    aRand = randNum();
    site = await fetch(urls[aRand]);
    cookieSite = new Response(site.body, site);
    //store cookie
    cookieSite.headers.set("Set-Cookie", urls[aRand]);
    return reWrite.transform(cookieSite);
  }
  //We stored the cookie 
  else {
    site = await fetch(cookieSite.headers.get("Set-Cookie"));
    return reWrite.transform(site);
  }
}
/**
 * Respond with fetch to certain website variants
 * @param {Request} request
 */
Respond with fetch to certain website variants
@param {Request} request
Respond with fetch to certain website variants @param { Request } request
async function handleRequest(request) {
  if (typeof cookieSite === "undefined") {
    res = await callWeb(address);
    urls = res.variants;
    aRand = randNum();
    site = await fetch(urls[aRand]);
    cookieSite = new Response(site.body, site);
    cookieSite.headers.set("Set-Cookie", urls[aRand]);
    return reWrite.transform(cookieSite);
  }
  else {
    site = await fetch(cookieSite.headers.get("Set-Cookie"));
    return reWrite.transform(site);
  }
}
async function handleRequest ( request ) { if ( typeof cookieSite === "undefined" ) { res = await callWeb ( address ) ; urls = res . variants ; aRand = randNum ( ) ; site = await fetch ( urls [ aRand ] ) ; cookieSite = new Response ( site . body , site ) ; cookieSite . headers . set ( "Set-Cookie" , urls [ aRand ] ) ; return reWrite . transform ( cookieSite ) ; } else { site = await fetch ( cookieSite . headers . get ( "Set-Cookie" ) ) ; return reWrite . transform ( site ) ; } }
Respond with fetch to certain website variants
 @param {Request} request
Respond with fetch to certain website variants @param { Request } request
//we have not stored cookie yet //store cookie //We stored the cookie 