We have to find $$ \int_{C} \sec^2{z} \cdot dz$$ Where C be any path from $\frac{\pi i}{4}$ to $\frac{\pi}{4}$ in the unit disk.
We know that,
$$Z = x + iy$$ so,
$$dz = dx + idy$$
so the integral changes to,
$$ \int_{C} \sec^2{(x + iy)} \cdot (dx + idy)$$
So whats next from here?
Edit: It was meant to be $\sec^2{z}$ sorry for the typo.
$\newcommand{\d}{\,\mathrm{d}}$To be clear, although I appreciate you were just passing to the Cartesian form, we don't know that $z=(x+iy)$ a straight line path taken by $C$. Indeed such paths are not terribly useful in this case. What is useful is the Cauchy integral theorem:
$f(z)=\sec^2(z)$ is certainly holomorphic in this disk, so we may apply the above theorem.
Motivation: We know about the links between trigonometric and hyperbolic functions (on the real and imaginary axes) and we know how to integrate "normally" along these axes.
Then define $L_1$ to be the straight line contour $\pi/4\to0$ running along the real axis, and $L_2$ to be the straight line contour $0\to i\pi/4$ running along the imaginary axis. If we let $C$ be the (non-closed!) contour $i\pi/4\to\pi/4$, which can be any path in the disk, then taking the union of $C$ with $L_1,L_2$ gives a closed contour $\gamma$ (contained in the disk):
$$\begin{align}0&=\int_\gamma f(z)\d z\\&=\int_C\sec^2(z)\d z-\int_0^{\pi/4}\sec^2(x)\d x-\int_0^{\pi i/4}\sec^2(z)\d z\\\int_C\sec^2(z)\d z&=[\tan(\pi/4)-\tan(0)]+i\int_0^{\pi/4}\sec^2(ix)\overset{z=ix}{\d x}\\&=1+i\int_0^{\pi/4}\operatorname{sech}^2(x)\d x\\&=1+i[\tanh(\pi/4)-\tanh(0)]\\&=1+i\cdot\tanh(\pi/4)\end{align}$$
Take a moment to admire the striking fact that this result is independent of $C$!