Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1003106 // setCookie

JavaX fragment (include)

1  
static int setCookie_defaultExpirationDays = 365;
2  
3  
static void setCookie(S name, S value) {
4  
  setCookie(name, value, setCookie_defaultExpirationDays);
5  
}
6  
7  
static void setCookie(S name, S value, int cookieDays) {
8  
  // hopefully this refreshes the expiration?
9  
  call(getCookieHandler(), "set", name, urlencode(value), cookieDays); 
10  
}

Author comment

Began life as a copy of #1003105

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003106
Snippet name: setCookie
Eternal ID of this version: #1003106/1
Text MD5: 57ad785640924176a768f0184bc3d6af
Author: stefan
Category: eleu / javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-30 23:04:23
Source code size: 341 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 671 / 659
Referenced in: [show references]