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

19
LINES

< > BotCompany Repo | #1001852 // serve404

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5039L/35K).

meta-comment { not using default arguments here because transpiler bugs in this case }

ifdef NoNanoHTTPD
static virtual NanoHTTPD.Response serve404() {
  ret subBot_serve404();
}
static virtual NanoHTTPD.Response serve404(S msg) {
  ret subBot_serve404(msg);
}
endifdef

ifndef NoNanoHTTPD
static NanoHTTPD.Response serve404() {
  ret serve404("Not found");
}
static NanoHTTPD.Response serve404(S msg) {
  ret NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT, "Code 404 - " + msg);
}
endifndef

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: #1001852
Snippet name: serve404
Eternal ID of this version: #1001852/4
Text MD5: 4747661953ebe0088d3b641471926f78
Transpilation MD5: f8935756acdbe69b08f1c2886b74ffea
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-14 16:41:17
Source code size: 549 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 665 / 1312
Version history: 3 change(s)
Referenced in: [show references]