class HttpClient {

    public static HttpGet initializeHttpGet(final String url, final Context context) {
        final HttpGet httpGet = new HttpGet(url);

        if (getWebViewUserAgent() == null && context != null) {
            // Memoize the user agent since creating WebViews is expensive
            setWebViewUserAgent(new WebView(context).getSettings().getUserAgentString());
        }


        final String webViewUserAgent = getWebViewUserAgent();
        if (webViewUserAgent != null) {
            httpGet.addHeader(USER_AGENT.getKey(), webViewUserAgent);
        }

        return httpGet;
    }

}