B4X:
restServer.AddHandler("/epoxy/shutdown", "EpoxyShutdown", False)
...
Sub Handle(req As ServletRequest, resp As ServletResponse)
resp.Write("OK")
Log("Shutting down.")
ExitApplication2(0)
End Sub
The following is from my JScript CLI tool
B4X:
f = new Http("http://localhost:8888/epoxy/shutdown")
f.setVerb("GET").openConnection().sendTraffic().result()
-> false,-2147483638,The data necessary to complete this operation is not yet available. [http://localhost:12345/epoxy/shutdown],,