func StreamHandler(resp *dapper.Responder, req *dapper.Request) { messages := make(chan []byte) go func() { for { messages <- []byte("howdy!") } }() resp.Stream(messages) }
func OtherHandler(resp *dapper.Responder, req *dapper.Request) { resp.Respond([]byte("hello"), 200) }
func HomeHandler(resp *dapper.Responder, req *dapper.Request) { resp.Respond([]byte("home page"), 200) }
func Handler(resp *dapper.Responder, req *dapper.Request) { filename := req.Params["filename"] resp.Respond([]byte(filename), 200) }