Rational endomorphisms of codimension one holomorphic foliations