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