Dump out http headers and eliminate some methods in RestUtil.