The person on whom the writ is served shall bring before the judge the person in his custody, or under his restraint, unless it be made to appear that by reason of sickness he cannot be removed; in which case, another day may be appointed by the judge or court for hearing the cause, and for the production of the person confined; or the application may be heard and decided without the production of the person detained, by the consent of his counsel.
Tex. Code Crim. Proc. § 11.31