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

7
LINES

< > BotCompany Repo | #1004389 // domainName - for web bots (get "Host" field from headers)

JavaX fragment (include)

1  
static S domainName() {
2  
  O session = call(getMainBot(), "getSession");
3  
  Map headers = cast call(session, "getHeaders");
4  
  S host = cast headers.get("host");
5  
  if (host == null) null;
6  
  ret dropFrom(host, ":");
7  
}

Author comment

Began life as a copy of #763

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: #1004389
Snippet name: domainName - for web bots (get "Host" field from headers)
Eternal ID of this version: #1004389/3
Text MD5: c86a6caa41a7dbd977ec91083b2b692d
Author: stefan
Category: eleu / javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-30 16:03:26
Source code size: 219 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 602 / 586
Version history: 2 change(s)
Referenced in: [show references]