Skip to content

Commit 4870719

Browse files
author
Raul Hidalgo Caballero
committed
HttpClientHandler to HttpMessageHandler (more generic)
1 parent e5e46e8 commit 4870719

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/GraphQL.Client/GraphQLClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public GraphQLClient(Uri endPoint, GraphQLClientOptions options) {
5959
this.Options.EndPoint = endPoint ?? throw new ArgumentNullException(nameof(endPoint));
6060

6161
if (this.Options.JsonSerializerSettings == null) { throw new ArgumentNullException(nameof(this.Options.JsonSerializerSettings)); }
62-
if (this.Options.HttpClientHandler == null) { throw new ArgumentNullException(nameof(this.Options.HttpClientHandler)); }
62+
if (this.Options.HttpMessageHandler == null) { throw new ArgumentNullException(nameof(this.Options.HttpMessageHandler)); }
6363
if (this.Options.MediaType == null) { throw new ArgumentNullException(nameof(this.Options.MediaType)); }
6464

65-
this.httpClient = new HttpClient(this.Options.HttpClientHandler);
65+
this.httpClient = new HttpClient(this.Options.HttpMessageHandler);
6666
}
6767

6868
/// <summary>
@@ -74,10 +74,10 @@ public GraphQLClient(GraphQLClientOptions options) {
7474

7575
if (this.Options.EndPoint == null) { throw new ArgumentNullException(nameof(this.Options.EndPoint)); }
7676
if (this.Options.JsonSerializerSettings == null) { throw new ArgumentNullException(nameof(this.Options.JsonSerializerSettings)); }
77-
if (this.Options.HttpClientHandler == null) { throw new ArgumentNullException(nameof(this.Options.HttpClientHandler)); }
77+
if (this.Options.HttpMessageHandler == null) { throw new ArgumentNullException(nameof(this.Options.HttpMessageHandler)); }
7878
if (this.Options.MediaType == null) { throw new ArgumentNullException(nameof(this.Options.MediaType)); }
7979

80-
this.httpClient = new HttpClient(this.Options.HttpClientHandler);
80+
this.httpClient = new HttpClient(this.Options.HttpMessageHandler);
8181
}
8282

8383
#endregion

src/GraphQL.Client/GraphQLClientOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public class GraphQLClientOptions {
2424
};
2525

2626
/// <summary>
27-
/// The <see cref="System.Net.Http.HttpClientHandler"/> that is going to be used
27+
/// The <see cref="System.Net.Http.HttpMessageHandler"/> that is going to be used
2828
/// </summary>
29-
public HttpClientHandler HttpClientHandler { get; set; } = new HttpClientHandler();
29+
public HttpMessageHandler HttpMessageHandler { get; set; } = new HttpClientHandler();
3030

3131
/// <summary>
3232
/// The <see cref="MediaTypeHeaderValue"/> that will be send on POST

0 commit comments

Comments
 (0)