add function adapter to httpserver.go