|
|
@ -7,6 +7,7 @@ using System.Runtime.Serialization; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Volo.Abp; |
|
|
|
|
|
|
|
namespace Win_in.Sfs.Scp.WebApi.XmlHost |
|
|
|
{ |
|
|
@ -37,12 +38,17 @@ namespace Win_in.Sfs.Scp.WebApi.XmlHost |
|
|
|
{ |
|
|
|
var client = CreateClient(); |
|
|
|
var response = await client.PostAsJsonAsync(routeString, input); |
|
|
|
response.EnsureSuccessStatusCode(); |
|
|
|
var str =await response.Content.ReadAsStringAsync(); |
|
|
|
|
|
|
|
if (response.IsSuccessStatusCode) |
|
|
|
{ |
|
|
|
var dto = await response.Content.ReadFromJsonAsync<TOutput>(); |
|
|
|
return dto; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var str = await response.Content.ReadAsStringAsync(); |
|
|
|
throw new AbpException(str); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private HttpClient CreateClient() |
|
|
|
{ |
|
|
|