Changed APIService to use HttpURLConnection instead of HttpClient