繁体   English   中英

Elasticsearch 巢6.5.1。 如何将原始请求发送到 Elasticsearch

[英]Elasticsearch Nest 6.5.1. How do I get the Raw Request being sent to Elasticsearch

我正在使用 Elasticsearch 6.5.1 并希望看到原始请求被发送到 Elasticsearch。 我在我的 ConnectionSettings 上设置了 DisableDirectStreaming,但是在进行 GetAsync 调用后,IGetResponse.ApiCall.RequestBodyInBytes 始终是 null。 但是, ResponseBodyInbytes 很好。

请有人解释我在使用 Elasticsearch Nest 6.5.1 时如何看到 RequestBodyInBytes。

启用DisableDirectStreaming后,您可以在每个响应 object 的DebugInformation中看到发送到 elasticsearch 的请求。 链接到 NEST 文档

希望有帮助。

我相信您还必须在连接设置上调用EnableDebugMode()

另一种选择是致电

var jsonString = yourclient.RequestResponseSerializer.SerializeToString(yourdescriptor);

在您的描述符上,但我认为 debugMode 更方便。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM