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

7
LINES

< > BotCompany Repo | #1007901 // serveText - for sub-bots or direct servers

JavaX fragment (include)

1  
// TODO: at least convert to UTF-8 on the fly
2  
sO serveText(O s) {
3  
  ifndef NoNanoHTTPD
4  
    if (getMainBot() == null) ret serveText_direct(str(s));
5  
  endifndef
6  
  ret call(getMainBot(), "serveByteArray", toUtf8(str(s)), "text/plain; charset=utf8");
7  
}

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: #1007901
Snippet name: serveText - for sub-bots or direct servers
Eternal ID of this version: #1007901/8
Text MD5: 24482ac9650aaa53b33c60dac201b39d
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-22 23:57:51
Source code size: 258 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 633 / 637
Version history: 7 change(s)
Referenced in: [show references]