Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/Seq.Api/Client/SeqApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
Expand All @@ -26,7 +25,6 @@
using Seq.Api.Model;
using Seq.Api.Model.Root;
using Seq.Api.Serialization;
using Tavis.UriTemplates;
using System.Threading;
using Seq.Api.Streams;
using System.Net.WebSockets;
Expand Down Expand Up @@ -58,9 +56,7 @@ public class SeqApiClient : IDisposable
/// <param name="serverUrl">The base URL of the Seq server.</param>
/// <param name="apiKey">An API key to use when making requests to the server, if required.</param>
/// <param name="useDefaultCredentials">Whether default credentials will be sent with HTTP requests; the default is <c>true</c>.</param>
/// <param name="requestTimeout">The time to wait before canceling long-running HTTP requests; the default (<c>null</c>) is to use the
/// system request timeout, normally 100 seconds. To disable timing out at the client, pass <see cref="Timeout.InfiniteTimeSpan"/>.</param>
public SeqApiClient(string serverUrl, string apiKey = null, bool useDefaultCredentials = true, TimeSpan? requestTimeout = null)
public SeqApiClient(string serverUrl, string apiKey = null, bool useDefaultCredentials = true)
{
ServerUrl = serverUrl ?? throw new ArgumentNullException(nameof(serverUrl));

Expand All @@ -82,9 +78,6 @@ public SeqApiClient(string serverUrl, string apiKey = null, bool useDefaultCrede

if (_apiKey != null)
HttpClient.DefaultRequestHeaders.Add("X-Seq-ApiKey", _apiKey);

if (requestTimeout != null)
HttpClient.Timeout = requestTimeout.Value;
}

/// <summary>
Expand Down
6 changes: 2 additions & 4 deletions src/Seq.Api/SeqConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ public class SeqConnection : ISeqConnection
/// <param name="serverUrl">The base URL of the Seq server.</param>
/// <param name="apiKey">An API key to use when making requests to the server, if required.</param>
/// <param name="useDefaultCredentials">Whether default credentials will be sent with HTTP requests; the default is <c>true</c>.</param>
/// <param name="requestTimeout">The time to wait before canceling long-running HTTP requests; the default (<c>null</c>) is to use the
/// system request timeout, normally 100 seconds. To disable timing out at the client, pass <see cref="Timeout.InfiniteTimeSpan"/>.</param>
public SeqConnection(string serverUrl, string apiKey = null, bool useDefaultCredentials = true, TimeSpan? requestTimeout = null)
public SeqConnection(string serverUrl, string apiKey = null, bool useDefaultCredentials = true)
{
if (serverUrl == null) throw new ArgumentNullException(nameof(serverUrl));
Client = new SeqApiClient(serverUrl, apiKey, useDefaultCredentials, requestTimeout);
Client = new SeqApiClient(serverUrl, apiKey, useDefaultCredentials);
}

/// <summary>
Expand Down