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

8
LINES

< > BotCompany Repo | #1032566 // serveTextOrHTML - or 404

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

Libraryless. Click here for Pure Java version (3899L/22K).

sO serveTextOrHTML(File f) {
  if (!fileExists(f))
    ret subBot_serve404();
  if (hasExtension(f, ".txt"))
    ret subBot_serveText(f);
  else
    ret subBot_serveHTMLFile(f);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032566
Snippet name: serveTextOrHTML - or 404
Eternal ID of this version: #1032566/1
Text MD5: 86be03f50cafd58a3bc81279bf35f471
Transpilation MD5: 3823f2369dbc121af815a902a546729e
Author: stefan
Category: javax / http
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-22 23:59:44
Source code size: 188 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 136 / 208
Referenced in: [show references]