For debugging purposes it can be useful to see the executed REST call. To make this possible using NEST you first have to disable Direct Streaming after which you can start capturing request and response data.
Here is a short snippet on how to enable this in your application:
Important: Don’t forget to disable this when you go to production, it has a big impact on performance.