Adding http support for making query to database