If an officer having the custody of any such person by virtue of a precept refuses or delays unnecessarily to deliver to the applicant an attested copy of the precept, on demand, the court or justice, on proof by affidavit of the applicant or other credible witness of the demand and refusal or of unnecessary delay, shall forthwith issue the writ of habeas corpus as prayed for.
RSA 534:7
RS 202:7. CS 215:7. GS 224:7. GL 243:7. PS 239:7. PL 350 :7. RL 406:7.