534:1 Right.
A person imprisoned or otherwise restrained of his personal liberty, by an officer or other person, except in the cases mentioned in the following section, is entitled of right to a writ of habeas corpus according to the provisions of this chapter.