If you are doing the integral from $0$ to $\infty$ it's worth noting the following. Consider the integral $$\frac{1}{2\pi i} \int \frac{\log z}{1+z^n} dz, \qquad n=4$$ around the classic keyhole contour, that is to say, start at 0 just above the real axis, go along the real axis to $\infty$, then anticlockwise in a circle until you get to $\infty$ just below the real axis, then back to zero. The log funciton is different on the two sides of the branch cut. The rest is residue calculus. Note that this works for any $n\ge 2$, and emerges as $(\pi/n) \mathrm{cosec} (\pi/n)$.
A related trick is $$\frac{1}{2\pi i} \int \frac{z^a}{1+z^n} dz$$ around the same contour, and let $a\to0$ whereupon the branch cut disappears(!) but the answer remains intact.