break htmlPost out into helper method