In making an arrest, all reasonable means are permitted to be used to effect it. No greater force, however, shall be resorted to than is necessary to secure the arrest and detention of the accused.