For $f(x)=\int_{-\infty}^{\infty}{\frac{1}{x^n+1}\, dx}$ I tried using a semi-circle $\gamma$ in the upper half plane. So the integral over the whole contour $C$ is :
$$\oint_{C}=\int_{-R}^{R}{\frac{1}{x^n+1}\, dx} + \int_{\gamma}{\frac{1}{z^n+1}\, dz}=2\pi i\sum{\mathrm{Res}(f(z))}$$
The issue is the residues :
$$\begin{align}z^n+1&=0\\re^{in\theta}&=e^{i\pi}\\n\theta&=\pi +2k\pi\\z&=e^{\frac{\pi}{n}\left(2k+1\right)}\, \, \, k=0\dots (n-1)\end{align}$$
Using the limit formula :
$$\begin{align}\lim_{z\to e^{\frac{\pi}{n}\left(2k+1\right)}}{(z-e^{\frac{i\pi}{n}\left(2k+1\right)})}{\frac{1}{z^n+1}}&=\lim_{z\to e^{\frac{i\pi}{n}\left(2k+1\right)}}\frac{1}{nz^{n-1}}\\&=\frac{1}{n(e^{\frac{i\pi}{n}\left(2k+1\right)})^{n-1}}\\&=\frac{e^{\frac{i\pi}{n}\left(2k+1\right)}}{ne^{{i\pi}\left(2k+1\right)}}\cdot\frac{e^{-i\pi\left(2k+1\right)}}{e^{-i\pi\left(2k+1\right)}}\\&=\frac{1}{n}\left(e^{i\pi(2k+1)(\frac{1}{n}-1)}\right)\end{align}$$
Putting this into the sum :
$$2\pi i\sum_{k=0}^{n-1}{\frac{1}{n}e^{i\pi(2k+1)(\frac{1}{n}-1)}}=\frac{2\pi i}{n}\left[e^{i\pi(\frac{1}{n}-1)}+e^{3i\pi(\frac{1}{n}-1)}+e^{5i\pi(\frac{1}{n}-1)}+...\right]$$
Can this be continued to arrive at an answer? Could a different contour yield better results?
It does work out, granted with more work than with the wedge contour that only encloses a single pole. Continuing that sum :
$$\begin{align}2\pi i\sum_{k=0}^{n-1}{\frac{1}{n}e^{i\pi(2k+1)(\frac{1}{n}-1)}}&=\frac{2\pi i}{n}\left[e^{i\pi(\frac{1}{n}-1)}+e^{3i\pi(\frac{1}{n}-1)}+e^{5i\pi(\frac{1}{n}-1)}+...\right]\\&=\frac{2\pi i}{n}\left[\frac{e^{i\pi(\frac{1}{n}-1)}(1-e^{2i\pi n(\frac{1}{n}-1)})}{1-e^{2i\pi(\frac{1}{n}-1)}}\right]\\&=\frac{2\pi i}{n}{\left[\frac{e^{\frac{i\pi}{n}}}{e^{\frac{2i\pi}{n}}-1}\right]}\\&=\frac{2\pi i}{n}{\left[\frac{-2i\sin(\frac{\pi}{n})}{4\sin^2(\frac{\pi}{n})}\right]}\\&=\frac{\pi}{n}\csc\left(\frac{\pi}{n}\right)\end{align}$$