I am on updating to the latest Nest
version. Since I am getting not the expected results I am searching for replacement of the EnableTrace()
method which was a method of ConnectionSettings
on previous versions.
EnableTrace()
will be back, but it's not available yet(have a look).
For now you can use this code to print out information about request and response:
var settings = new ConnectionSettings(connectionPool)
.DefaultIndex(indexName)
.DisableDirectStreaming()
.OnRequestCompleted(details =>
{
Debug.WriteLine("### ES REQEUST ###");
if(details.RequestBodyInBytes != null) Debug.WriteLine(Encoding.UTF8.GetString(details.RequestBodyInBytes));
Debug.WriteLine("### ES RESPONSE ###");
if (details.ResponseBodyInBytes != null) Debug.WriteLine(Encoding.UTF8.GetString(details.ResponseBodyInBytes));
})
.PrettyJson();
Make sure you have set .DisableDirectStreaming()
on ConnectionSettings
.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With