Moved sendPost method outside Activity