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)

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

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: 547 / 524
Version history: 2 change(s)
Referenced in: [show references]