The application must be made upon affidavit, stating:
1.The nature of the offense charged;
2.The state of the proceedings in the action, and that an issue of fact has been joined therein;
3.The name of the witness, and that his testimony is material to the defense of the action;
4.That the witness resides out of the State.