Adding some events on http classes, and 2 functions