When an application to the court or judge is made without notice to the adverse party and the writ be allowed, the alternative must be first issued; but if the application be upon due notice and the writ be allowed, the peremptory may be issued in the first instance.