Browse Source
Merge pull request #6415 from abpframework/maliming/204
Handle the case where stringContent is empty.
pull/6418/head^2
liangshiwei
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs
|
|
|
@ -121,7 +121,12 @@ namespace Volo.Abp.Http.Client.DynamicProxying |
|
|
|
return (T)(object)stringContent; |
|
|
|
} |
|
|
|
|
|
|
|
return JsonSerializer.Deserialize<T>(await responseContent.ReadAsStringAsync()); |
|
|
|
if (stringContent.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
return default; |
|
|
|
} |
|
|
|
|
|
|
|
return JsonSerializer.Deserialize<T>(stringContent); |
|
|
|
} |
|
|
|
|
|
|
|
private async Task<HttpContent> MakeRequestAsync(IAbpMethodInvocation invocation) |
|
|
|
|