By letting $z=e^{i\theta}$ we have $dz= i e^{i\theta}d\theta$ and the wanted integral equals
$$ \int_{-\pi}^{\pi}\frac{\text{Re}(e^{i\theta})}{1+e^{i\theta}}ie^{i\theta}\,d\theta =i\int_{-\pi}^{\pi}\frac{\cos\theta(e^{i\theta}+1)}{2+2\cos\theta}\,d\theta=i\color{blue}{\int_{-\pi}^{\pi}\frac{\cos\theta}{2}\,d\theta}-\color{red}{\int_{-\pi}^{\pi}\frac{\sin\theta\cos\theta}{2(1+\cos\theta)}\,d\theta}$$ where the blue integral equals $0$ by the periodicity of $\cos$ and red integral is, strictly speaking, undefined like $\int_{-1}^{1}\frac{dx}{x}$, but its principal value equals zero since the integrand function is odd.