The application must state, in substance, as follows:
(1) That the party, in whose behalf the writ is applied for, is imprisoned or restrained of his liberty, the place where, and the officer or person by whom he is imprisoned or restrained, naming both parties, if their names are known, or describing them if they are not known.
(2) The cause or pretense of such imprisonment or restraint, according to the knowledge or belief of the applicant.
(3) If the imprisonment is by virtue of any warrant or other process, a copy thereof shall be annexed, or it shall be made to appear that a copy thereof has been demanded and refused, or that for some sufficient reason a demand for such copy could not be made.
(4) If the imprisonment or restraint is alleged to be illegal, the application must state in what the alleged illegality consists; and that the legality of the imprisonment or restraint has not been already adjudged, upon a prior writ of habeas corpus, to the knowledge or belief of the applicant.
(5) The facts set forth in the application must be verified by the oath of the applicant, or by that of some other credible witness, which oath may be administered by any person authorized by law to take affidavits. (1868-9, c. 116, s. 5; Code, s. 1627; Rev., s. 1825; C.S., s. 2209.)