I have a problem with an example in complex integration : 
"Determine the value of $\int\_{-\infty}^{\infty} \frac {e^{ix}}{cosh \space x}dx$

Try integrating over the rectangle: $-R$, $R$, $R+i\pi $, $-R+i\pi$ ."

I know that $\int\_{-R}^{R}$+$\int\_{R}^{R+i\pi}$+$\int\_{R+i\pi}^{-R+i\pi}$+$\int\_{-R+i\pi}^{-R}$ = $\sum Res(f,a)$, Im(a)>0, or a are inside the rectangle. Where $f=\frac{e^{ix}}{cosh \space x}$, and a are the singularities. And that $lim\_{R-> \infty}\int\_{-R}^{R}$=$\int\_{-\infty}^{\infty}$. The problem I'm having is with the basic contour integration of $\int\_{R}^{R+i\pi}$+$\int\_{R+i\pi}^{-R+i\pi}$+$\int\_{-R+i\pi}^{-R}$ , no substitution in $\int \frac {e^{ix}}{cosh \space x}$=$\int \frac {2\space e^{ix}}{e^x+e^{-x}}$ seems to work. So... how can I integrate $\int\_{R}^{R+i\pi}\frac {2\space e^{ix}}{e^x+e^{-x}}$ ?