public async Task Construct() { var request = new StopBuildRequest("buildid"); var result = CodeBuildClient.GetRequestMessage("https://google.com/", request); Assert.Equal(@"{""id"":""buildid""}", await result.Content.ReadAsStringAsync()); Assert.Equal("application/x-amz-json-1.1; charset=utf-8", result.Content.Headers.GetValues("Content-Type").First()); }
/// <summary> /// 停止构建任务 /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public async Task <StopBuildResponse> StopBuild(StopBuildRequest request) { return(await new StopBuildExecutor().Client(this).Execute <StopBuildResponse, StopBuildResult, StopBuildRequest>(request).ConfigureAwait(false)); }
/// <summary> /// 停止构建任务 /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public StopBuildResponse StopBuild(StopBuildRequest request) { return(new StopBuildExecutor().Client(this).Execute <StopBuildResponse, StopBuildResult, StopBuildRequest>(request)); }