The person making an arrest shall inform the defendant of the intention to arrest him, of the cause for the arrest and of the authority to make it, except when the person making the arrest has reasonable cause for believing that the defendant is committing or attempting to commit an offense, or when the defendant is pursued immediately after the commission of the offense or after an escape, or when the defendant resists before the officer is able to inform him, or when there is a danger that if the information is given, the arrest may not be made.