1414using System . Collections . Generic ;
1515using System . Text . Json ;
1616using System . Text . Json . Serialization ;
17+ using System . Threading ;
1718using System . Threading . Tasks ;
1819
1920namespace Keyfactor . Extensions . CAPlugin . HashicorpVault . Client
@@ -35,10 +36,9 @@ public VaultHttp(string host, string mountPoint, string authToken, string nameSp
3536
3637 _serializerOptions = new ( )
3738 {
38- DefaultIgnoreCondition = JsonIgnoreCondition . Never ,
39- PropertyNameCaseInsensitive = true ,
40- RespectNullableAnnotations = true ,
41- PreferredObjectCreationHandling = JsonObjectCreationHandling . Replace
39+ DefaultIgnoreCondition = JsonIgnoreCondition . WhenWritingNull ,
40+ PropertyNameCaseInsensitive = true ,
41+ PreferredObjectCreationHandling = JsonObjectCreationHandling . Populate
4242 } ;
4343
4444 var restClientOptions = new RestClientOptions ( $ "{ host . TrimEnd ( '/' ) } /v1") { ThrowOnAnyError = true } ;
@@ -69,15 +69,15 @@ public VaultHttp(string host, string mountPoint, string authToken, string nameSp
6969 public async Task < T > GetAsync < T > ( string path , Dictionary < string , string > parameters = null )
7070 {
7171 logger . MethodEntry ( ) ;
72- logger . LogTrace ( $ "preparing to send GET request to { path } with parameters { JsonSerializer . Serialize ( parameters ) } ") ;
72+ logger . LogTrace ( $ "preparing to send GET request to { _mountPoint } / { path } with parameters { JsonSerializer . Serialize ( parameters ) } ") ;
7373
7474 try
7575 {
7676 var request = new RestRequest ( $ "{ _mountPoint } /{ path } ", Method . Get ) ;
7777 if ( parameters != null && parameters . Keys . Count > 0 ) { request . AddJsonBody ( parameters ) ; }
7878 var response = await _restClient . ExecuteGetAsync ( request ) ;
7979
80- logger . LogTrace ( $ "raw response: { response . Content } ") ;
80+ logger . LogTrace ( $ "raw response: { JsonSerializer . Serialize ( response ) } ") ;
8181
8282 logger . LogTrace ( $ "response status: { response . StatusCode } ") ;
8383
0 commit comments