When an application is made before any authority authorized by law to issue such writs of habeas corpus it shall be the duty of such officers to issue a writ of certiorari commanding the committing magistrate forthwith to send to said officers a full and complete transcript of all his proceedings had thereof, and the said officer upon the return of such writ shall proceed to examine the case de novo and either commit to jail, discharge or recognize such person to appear before the district court as the case may require.
NMS § 44-1-24