Ejemplo n.º 1
0
        private void CreateClient(Uri server, string userToken = null)
        {
            if (m_httpClient != null)
            {
                m_httpClient.Dispose();
            }
            HttpMessageHandler handler = new HttpClientHandler();

            // Use this code to add custom headers (like api key) onto data
            handler = new PlugInHandler(handler, userToken);

            m_httpClient = new HttpClient(handler);
            m_httpClient.BaseAddress = server;
        }
Ejemplo n.º 2
0
        private void CreateClient(Uri server, string userToken = null)
        {
            if (m_httpClient != null)
            {
                m_httpClient.Dispose();
            }
            HttpMessageHandler handler = new HttpClientHandler();

            // Use this code to add custom headers (like api key) onto data
            handler = new PlugInHandler(handler, userToken);

            m_httpClient             = new HttpClient(handler);
            m_httpClient.BaseAddress = server;
        }