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 the 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.
R.L.1910, § 6038.