Upon the return of the writ of habeas corpus, a day shall be set for the hearing of the cause of imprisonment or restraint, not exceeding five days thereafter, unless the prisoner shall request a longer time; or the court or officer may proceed to such hearing immediately, as the circumstances of the case may require.
§ 532.310, RSMo