Cut the top off the onion and make slits all around it, not cutting all the way through.
In a bowl, whisk together the flour, cayenne, paprika, salt and pepper. In another bowl, whisk the egg and milk.
Heat oil in a pot. Coat onion in the flour mixture and shake off excess, then dip in egg mixture allowing excess to drip off. Dip the onion back in the flour. Fry until golden brown. Serve with dipping sauce.