Simplify flatMap syntax in HttpHelpers.