Simple networking class writen in swift