示例#1
0
 public async Task <GoCDTemplate> CreateAsync(GoCDTemplate template)
 {
     return(await this.BeginRequest()
            .PostJsonAsync(template)
            .ReceiveJson <GoCDTemplate>()
            .ConfigureAwait(false));
 }
示例#2
0
 public async Task UpdateAsync(GoCDTemplate template, string name = null)
 {
     await this.BeginRequest()
     .WithHeader("If-Match", template.ETag)
     .AppendPathSegment(name ?? template.Name)
     .PutJsonAsync(template)
     .ConfigureAwait(false);
 }