1、生成预任务执行调用Wcs生成任务链接口
2、Common新增ConfigurationExtenstions扩展类
This commit is contained in:
@@ -129,10 +129,10 @@ namespace Tnb.Common.Utils
|
||||
}
|
||||
|
||||
|
||||
private static async Task PostStreamAsync(object content, CancellationToken cancellationToken)
|
||||
public static async Task<string> PostStreamAsync(string url,object content, CancellationToken cancellationToken)
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, Url))
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, url))
|
||||
using (var httpContent = CreateHttpContent(content))
|
||||
{
|
||||
request.Content = httpContent;
|
||||
@@ -142,7 +142,9 @@ namespace Tnb.Common.Utils
|
||||
.ConfigureAwait(false))
|
||||
{
|
||||
response.EnsureSuccessStatusCode();
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user