11using System ;
2+ using System . Net . Http ;
23using System . Threading . Tasks ;
34using GitLabApiClient . Internal . Http ;
45using GitLabApiClient . Internal . Http . Serialization ;
@@ -23,7 +24,8 @@ public sealed class GitLabClient
2324 /// </summary>
2425 /// <param name="hostUrl">Host address of GitLab instance. For example https://gitlab.example.com or https://gitlab.example.com/api/v4/ </param>
2526 /// <param name="authenticationToken">Personal access token. Obtained from GitLab profile settings.</param>
26- public GitLabClient ( string hostUrl , string authenticationToken = "" )
27+ /// <param name="httpMessageHandler">Optional handler for HTTP messages. Used for SSL pinning or canceling validation for example.</param>
28+ public GitLabClient ( string hostUrl , string authenticationToken = "" , HttpMessageHandler httpMessageHandler = null )
2729 {
2830 Guard . NotEmpty ( hostUrl , nameof ( hostUrl ) ) ;
2931 Guard . NotNull ( authenticationToken , nameof ( authenticationToken ) ) ;
@@ -34,7 +36,8 @@ public GitLabClient(string hostUrl, string authenticationToken = "")
3436 _httpFacade = new GitLabHttpFacade (
3537 HostUrl ,
3638 jsonSerializer ,
37- authenticationToken ) ;
39+ authenticationToken ,
40+ httpMessageHandler ) ;
3841
3942 var projectQueryBuilder = new ProjectsQueryBuilder ( ) ;
4043 var projectIssueNotesQueryBuilder = new ProjectIssueNotesQueryBuilder ( ) ;
@@ -74,6 +77,7 @@ public GitLabClient(string hostUrl, string authenticationToken = "")
7477 Files = new FilesClient ( _httpFacade ) ;
7578 Runners = new RunnersClient ( _httpFacade ) ;
7679 ToDoList = new ToDoListClient ( _httpFacade , toDoListBuilder ) ;
80+ Connection = new ConnectionClient ( _httpFacade ) ;
7781 }
7882
7983 /// <summary>
@@ -161,6 +165,11 @@ public GitLabClient(string hostUrl, string authenticationToken = "")
161165 /// </summary>
162166 public ToDoListClient ToDoList { get ; }
163167
168+ /// <summary>
169+ /// Provides a client connection to make rest requests to HTTP endpoints.
170+ /// </summary>
171+ public ConnectionClient Connection { get ; }
172+
164173 /// <summary>
165174 /// Host address of GitLab instance. For example https://gitlab.example.com or https://gitlab.example.com/api/v4/.
166175 /// </summary>
0 commit comments