public GitterBroker(GitterConfiguration configuration) { _client = new HttpClient { Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite) }; _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", configuration.Token); }
public GitterAdapter(GitterBroker broker, GitterConfiguration configuration, IMessageQueue messageQueue, ILog log) { _broker = broker; _messageQueue = messageQueue; _log = new AdapterLog("Gitter", log); // Create the Bayeux client. var settings = new BayeuxClientSettings(new Uri("https://ws.gitter.im/faye")); settings.Extensions.Add(new GitterTokenExtension(configuration.Token)); _bayeux = new BayeuxClient(settings); }