Application for a writ of habeas corpus must be made by petition, signed either by the party himself for whose benefit it is intended or by some other person on his behalf, must be verified by the oath of the applicant to the effect that the statements therein contained are true to the best of his knowledge, information and belief and must state, in substance, the name of the person on whose behalf the application is made, that he is imprisoned or restrained of his liberty in the county, the place of such imprisonment, if known, the name of the officer or person by whom he is so imprisoned and the cause or pretense of such imprisonment; and, if the imprisonment is by virtue of any warrant, writ or other process, a copy thereof must be annexed to the petition or the petition must allege that a copy thereof has been demanded and refused or must show some sufficient excuse for the failure to demand a copy.
Ala. Code § 15-21-4 (1975)