Made HTTP request work properly