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: | 744 / 1402 |
Version history: | 3 change(s) |
Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1004436 - serveRedirect #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1023678 - serve500 #1024508 - serve403 - forbidden #3000382 - Answer for ferdie (>> t = 1, f = 0) |