No person arrested pursuant to W.S. 7-3-208 shall be delivered over to the agent whom the executive authority demanding him shall have appointed to receive him unless he has been informed of the demand made for his surrender and of the crime with which he is charged, and that he has the right to demand legal counsel. If the prisoner, his friends, or counsel shall state that he or they desire to test the legality of the arrest, the prisoner shall be taken forthwith before a judge of a court of record in this state, who shall fix a reasonable time to be allowed him within which to apply for a writ of habeas corpus. When the writ is applied for, notice thereof, and of the time and place of hearing thereon, shall be given to the prosecuting officer of the county in which the arrest is made and in which the accused is in custody, and to the appointed agent of the demanding state.
W.S. 7-3-210