Extract method to call an web service

Signed-off-by: Igor Popov <igor.popov89@gmail.com>