Skip to content
[deprecated] Meddle is a middleware stack for use with HttpServer.jl
Find file
New pull request
Latest commit 6b7d916 @IainNZ IainNZ Update
Failed to load latest commit information.
src removed comma #9
LICENSE.txt added MIT license Update


2015-09-03: This package is deprecated, and does not have an active maintainer. It is not recommended for use in new projects. Commit access may be given to anyone interested in taking on reviving, maintaining, or furthering development. If you are interested, please submit a PR that updates the package. An alternative package is Mux.jl.

Meddle Meddle

Meddle is a middleware stack for use with HttpServer.jl.

Installation: Pkg.add("Meddle")


Define a 'stack' of middleware through which incoming Requests are processed:

using HttpServer
using Meddle

stack = middleware(DefaultHeaders, URLDecoder, CookieDecoder, FileServer(pwd()), NotFound)
http = HttpHandler((req, res)->Meddle.handle(stack, MeddleRequest(req, Dict{Symbol,Any}()), res))

for event in split("connect read write close error")[event] = (event->(client, args...)->println(,": $event"))(event)
end["error"] = (client, err)->println(err)["listen"] = (port)->println("Listening on $port...")

server = Server(http)
run(server, 8000)
::         ::
:: Made at ::
::         ::
Hacker School
Something went wrong with that request. Please try again.