http request separated as a class