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

11
LINES

< > BotCompany Repo | #1001649 // Test serveHttp

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (3071L/23K/61K).

!752

p {
  serveHttp(7777);
}

static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method,
  Map<S,S> header, Map<S,S> parms, Map<S,S> files) {
  print("Serving HTML.");
  ret serveHTML("Hello world (as usual...)");
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001649
Snippet name: Test serveHttp
Eternal ID of this version: #1001649/1
Text MD5: 4ce2d04479f52c1586f2caa7395945f7
Transpilation MD5: b8521eae86ff1ae04080393e3c3a0251
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-06 13:48:27
Source code size: 234 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 612 / 1061
Referenced in: #755 - HTTP Proxy (developing)
#1001784 - Connect an http() bot as web server
#1001813 - Serve HTTP on port 80
#1002646 - "Phone Server" - Serve local directory (HTTP, Android, unprotected, WORKS)
#1002693 - Test serveHttp with filtered input/output streams
#1008792 - Test cleaning up web module running a web server [WORKS, closes server port automatically]
#1010769 - Home Server (port 6688)
#1011232 - Test making all fields, methods & classes public in Java source [OK]
#3000382 - Answer for ferdie (>> t = 1, f = 0)