private static string ProjectWikis_DeleteWikiPageAsync_BuildUrl(Meziantou.GitLab.DeleteWikiPageProjectWikiRequest request) { string url; using (Meziantou.GitLab.Internals.UrlBuilder urlBuilder = new Meziantou.GitLab.Internals.UrlBuilder()) { urlBuilder.Append("projects/"); if (request.Id.HasValue) { urlBuilder.AppendParameter(request.Id.GetValueOrDefault().ValueAsString); } urlBuilder.Append("/wikis/"); if ((!object.ReferenceEquals(request.Slug, null))) { urlBuilder.AppendParameter(request.Slug); } url = urlBuilder.ToString(); } return(url); }
private async System.Threading.Tasks.Task ProjectWikis_DeleteWikiPageAsync(Meziantou.GitLab.DeleteWikiPageProjectWikiRequest request, Meziantou.GitLab.RequestOptions?requestOptions = default(Meziantou.GitLab.RequestOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { string url = Meziantou.GitLab.GitLabClient.ProjectWikis_DeleteWikiPageAsync_BuildUrl(request); using (System.Net.Http.HttpRequestMessage requestMessage = new System.Net.Http.HttpRequestMessage()) { requestMessage.Method = System.Net.Http.HttpMethod.Delete; requestMessage.RequestUri = new System.Uri(url, System.UriKind.RelativeOrAbsolute); HttpResponse?response = null; try { response = await this.SendAsync(requestMessage, requestOptions, cancellationToken).ConfigureAwait(false); await response.EnsureStatusCodeAsync(cancellationToken).ConfigureAwait(false); } finally { if ((response != null)) { response.Dispose(); } } } }
System.Threading.Tasks.Task Meziantou.GitLab.IGitLabProjectWikisClient.DeleteWikiPageAsync(Meziantou.GitLab.DeleteWikiPageProjectWikiRequest request, Meziantou.GitLab.RequestOptions?requestOptions, System.Threading.CancellationToken cancellationToken) { return(this.ProjectWikis_DeleteWikiPageAsync(request, requestOptions, cancellationToken)); }