Answer
$r=-\csc \theta \ln (\cos \theta)+c \csc \theta$
Work Step by Step
Here, we have $r'+\cot (\theta) r=\sec \theta$
The integrating factor is: $I=e^{\int \cot \theta d\theta}=\sin \theta$
Now, $\sin \theta [r'+\cot \theta r]=\sin \theta \sec \theta$
This gives: $\int [\sin \theta (r)]' dt=\tan \theta d\theta$
$\implies \sin (\theta) (r)=-\ln |\cos \theta|+c$
so, the general solution is:
$r=-\csc \theta \ln (\cos \theta)+c \csc \theta$