Пример #1
0
        private void SetupClient(OpbeatConfiguration configuration)
        {
            client.BaseAddress = new Uri("https://intake.opbeat.com");

            var defaultRequestHeaders = client.DefaultRequestHeaders;

            defaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", configuration.AccessToken);

            var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();

            defaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("opbeat.net", assemblyVersion));
        }
Пример #2
0
        public OpbeatClient(OpbeatConfiguration configuration)
        {
            client = new HttpClient();

            SetupClient(configuration);

            releasesUrl = string.Format("api/v1/organizations/{0}/apps/{1}/releases/",
                                        configuration.OrganizationId,
                                        configuration.ApplicationId
                                        );

            errorsUrl = string.Format("api/v1/organizations/{0}/apps/{1}/errors/",
                                      configuration.OrganizationId,
                                      configuration.ApplicationId
                                      );
        }