Using a closure now for the mini-http function

Signed-off-by: Graham Chiu <compkarori@gmail.com>