Functions of the body's general response of sensitization to foreign substances, including infections.