Skip to content
Closed
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
14 changes: 12 additions & 2 deletions src/GraphQL.Client/Http/GraphQLHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ public partial class GraphQLHttpClient : IGraphQLClient {
/// <summary>
/// Gets the headers which should be sent with each request.
/// </summary>
public HttpRequestHeaders DefaultRequestHeaders => this.graphQLHttpHandler.HttpClient.DefaultRequestHeaders;
public HttpRequestHeaders DefaultRequestHeaders => this.HttpClient.DefaultRequestHeaders;

/// <summary>
/// the instance of <see cref="HttpClient"/> which is used internally
/// </summary>
public HttpClient HttpClient => this.graphQLHttpHandler.HttpClient;

/// <summary>
/// The GraphQL EndPoint to be used
Expand Down Expand Up @@ -90,7 +95,12 @@ public GraphQLHttpClient(GraphQLHttpClientOptions options) {
this.graphQLHttpHandler = new GraphQLHttpHandler(options);
}

internal GraphQLHttpClient(GraphQLHttpClientOptions options, HttpClient httpClient) {
/// <summary>
/// Creates a new instance
/// </summary>
/// <param name="options">The Options to be used</param>
/// <param name="httpClient">the <see cref="HttpClient"/> to be used</param>
public GraphQLHttpClient(GraphQLHttpClientOptions options, HttpClient httpClient) {
if (options == null) { throw new ArgumentNullException(nameof(options)); }
if (options.EndPoint == null) { throw new ArgumentNullException(nameof(options.EndPoint)); }
if (options.JsonSerializerSettings == null) { throw new ArgumentNullException(nameof(options.JsonSerializerSettings)); }
Expand Down