It tests the legality of a detention or a restraint and the goal is to use it really almost i guess it's an emergency basis. The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention.A writ of habeas corpus requires that a person who is in custody be brought before a judge or court and that they be able to challenge that custody. Remember that a writ of habeas corpus is a lawsuit against the warden who is confining the defendant. The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful. The writ of habeas corpus is a legal order requiring a person holding another person to produce that individual before a court or judge. Habeas corpus means "that you have the body," and is a writ of inquiry used to test the validity of a person's detention. I. Article I, section 13 of the Florida Constitution states: "The writ of habeas corpus shall be grantable of right, freely and without cost. For example, when a court issues a writ of habeas corpus, it demands that the person who is detaining you release you from custody.