Libraryless. Click here for Pure Java version (5039L/35K).
1 | meta-comment { not using default arguments here because transpiler bugs in this case } |
2 | |
3 | ifdef NoNanoHTTPD |
4 | static virtual NanoHTTPD.Response serve404() { |
5 | ret subBot_serve404(); |
6 | } |
7 | static virtual NanoHTTPD.Response serve404(S msg) { |
8 | ret subBot_serve404(msg); |
9 | } |
10 | endifdef |
11 | |
12 | ifndef NoNanoHTTPD |
13 | static NanoHTTPD.Response serve404() { |
14 | ret serve404("Not found"); |
15 | } |
16 | static NanoHTTPD.Response serve404(S msg) { |
17 | ret NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT, "Code 404 - " + msg); |
18 | } |
19 | 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: | 745 / 1403 |
Version history: | 3 change(s) |
Referenced in: | [show references] |