Encapsulated query in MainViewModel. Wrote working HTTP service.