code: func makeHTTPHandler(rpcFunc *RPCFunc, logger *logging.Logger) func(http.ResponseWriter, *http.Request) {
  	// Exception for websocket endpoints
  	if rpcFunc.ws {
  		return func(w http.ResponseWriter, r *http.Request) {
  			WriteRPCResponseHTTP(w, types.RPCMethodNotFoundError(""))
  		}
  	}
  	logger = logger.WithScope("makeHTTPHandler")
  	// All other endpoints
  	return func(w http.ResponseWriter, r *http.Request) {
  		logger.TraceMsg("HTTP REST Handler received request", "request", r)
  		args, err := httpParamsToArgs(rpcFunc, r)
  		if err != nil {
  			WriteRPCResponseHTTP(w, types.RPCInvalidParamsError("", errors.Wrap(err, "Error converting http params to arguments")))
  			return
  		}
  		returns := rpcFunc.f.Call(args)
  		logger.InfoMsg("HTTP REST", "method", r.URL.Path, "args", args, "returns", returns)
  		result, err := unreflectResult(returns)
  		if err != nil {
  			WriteRPCResponseHTTP(w, types.RPCInternalError("", err))
  			return
  		}
  		WriteRPCResponseHTTP(w, types.NewRPCSuccessResponse("", result))
  	}
  }
docs: // rpc.json
  //-----------------------------------------------------------------------------
  // rpc.http
  // convert from a function name to the http handler