[http] Use view callback api instead of returning api so that deferment works as expected