generic http flow