Skip to content

Commit 9549370

Browse files
committed
Merge pull request #545 from azubanov/NEST_path_request-debug-view
show request as json string in debug
2 parents f32f1a3 + 5851456 commit 9549370

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Elasticsearch.Net/Domain/ElasticsearchResponse.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.CodeDom;
33
using System.Collections.Generic;
44
using System.Configuration;
5+
using System.Diagnostics;
56
using System.Globalization;
67
using System.Linq;
78
using System.Runtime.CompilerServices;
@@ -24,12 +25,14 @@ public interface IElasticsearchResponse
2425
ConnectionError Error { get; }
2526
string RequestMethod { get; }
2627
string RequestUrl { get; }
28+
[DebuggerDisplay("{Request != null ? System.Text.Encoding.UTF8.GetString(Request) : null,nq}")]
2729
byte[] Request { get; }
2830
int? HttpStatusCode { get; }
2931

3032
/// <summary>
3133
/// The raw byte response, only set when IncludeRawResponse() is set on Connection configuration
3234
/// </summary>
35+
[DebuggerDisplay("{ResponseRaw != null ? System.Text.Encoding.UTF8.GetString(ResponseRaw) : null,nq}")]
3336
byte[] ResponseRaw { get; }
3437
}
3538

0 commit comments

Comments
 (0)