what is the proper contour for $\int_{-\infty}^{\infty}\frac{e^z}{1+e^{nz}}dz$ what is the proper contour for $$\int_{-\infty}^{\infty}\frac{e^z}{1+e^{nz}}dz:2\leq n$$
I tried with rectangle contour but the problem which I faced how to make the contour contain all branches point because $1+e^{nz}=0$ for every $z=\frac{2k+1}{n}$ :$k\in Z$
,or how to avoid them 

Set $w=nz$, then your integral is equal to $\displaystyle\frac{1}{n}\int_{\mathbb R}\frac{e^{w/n}}{1+e^w}\,dw=\frac{I}{n}$. Now, for $M>0$ big, consider the following rectangle contour: $$t_1\in[-M,M],\\ M+t_2i,\,t_2\in[0,2\pi],\\t_3+2\pi i,\,t_3\in[M,-M],\\-M+t_4i,t_4\in[2\pi,0].$$ On the second line, $$|I|\leq\int_0^{2\pi}\left|\frac{e^{M/n+ti/n}}{1+e^{M+ti}}\right|\,dt\leq\int_0^{2\pi}\frac{e^{M/n}}{|e^{M+ti}|-1}\,dt\leq2\pi\frac{e^{M/n}}{e^M-1},$$ which goes to $0$ as $M\to\infty$. Similarly for the fourth line. On the third line, we get $$-\int_{-M}^M\frac{e^{t/n+2\pi i/n}}{1+e^{t+2\pi i}}\,dt\to-e^{2\pi i/n}I,$$ as $M\to\infty$. Now, the residue on $\pi i$ is equal to $-e^{\pi i/n}$, so you have that $$I(1-e^{2\pi i/n})=-2\pi ie^{\pi i/n}\Rightarrow I=\frac{2\pi i}{e^{\pi i/n}-e^{-\pi i/n}}=\frac{\pi}{\sin(\pi/n)},$$ therefore your integral is equal to $\displaystyle\frac{\pi/n}{\sin(\pi/n)}$.
