Exemple #1
0
        private async System.Threading.Tasks.Task <UserAvatar?> Avatar_GetUserAvatarAsync(Meziantou.GitLab.GetUserAvatarRequest request, Meziantou.GitLab.RequestOptions?requestOptions = default(Meziantou.GitLab.RequestOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            string url = Meziantou.GitLab.GitLabClient.Avatar_GetUserAvatarAsync_BuildUrl(request);

            using (System.Net.Http.HttpRequestMessage requestMessage = new System.Net.Http.HttpRequestMessage())
            {
                requestMessage.Method     = System.Net.Http.HttpMethod.Get;
                requestMessage.RequestUri = new System.Uri(url, System.UriKind.RelativeOrAbsolute);
                HttpResponse?response = null;
                try
                {
                    response = await this.SendAsync(requestMessage, requestOptions, cancellationToken).ConfigureAwait(false);

                    if ((response.StatusCode == System.Net.HttpStatusCode.NotFound))
                    {
                        return(default);
Exemple #2
0
 System.Threading.Tasks.Task <UserAvatar?> Meziantou.GitLab.IGitLabAvatarClient.GetUserAvatarAsync(Meziantou.GitLab.GetUserAvatarRequest request, Meziantou.GitLab.RequestOptions?requestOptions, System.Threading.CancellationToken cancellationToken)
 {
     return(this.Avatar_GetUserAvatarAsync(request, requestOptions, cancellationToken));
 }