@@ -43,8 +43,11 @@ public static string RenderIndexPage(List<DebugEntry> items)
4343
4444 public static string RenderDetailsPage ( DebugEntry x , DebugEnvironment e , string req , string res )
4545 {
46- var headers = string . Join ( "" , x . Headers . Select ( h =>
47- $ "<tr><td>{ Encode ( h . Key ) } </td><td>{ Encode ( h . Value ) } </td></tr>") ) ;
46+ //var headers = string.Join("", x.Reqe.Select(h =>
47+ // $"<tr><td>{Encode(h.Key)}</td><td>{Encode(h.Value)}</td></tr>"));
48+
49+ var requestHeaders = string . Join ( Environment . NewLine , x . RequestHeaders . Select ( h => $ "{ h . Key } : { h . Value } ") ) ;
50+ var responseHeaders = string . Join ( Environment . NewLine , x . ResponseHeaders . Select ( h => $ "{ h . Key } : { h . Value } ") ) ;
4851
4952 var pathWithQuery = string . IsNullOrEmpty ( x . Query )
5053 ? x . Path
@@ -79,13 +82,15 @@ public static string RenderDetailsPage(DebugEntry x, DebugEnvironment e, string
7982 . Replace ( "{{requestUrl}}" , Encode ( string . IsNullOrEmpty ( x . RequestUrl ) ? "" : x . RequestUrl ) )
8083 . Replace ( "{{requestType}}" , GetPayloadType ( req ) )
8184 . Replace ( "{{requestTypeClass}}" , GetPayloadTypeClass ( req ) )
85+ . Replace ( "{{requestHeaders}}" , Encode ( requestHeaders ) )
8286 . Replace ( "{{request}}" , Encode ( string . IsNullOrEmpty ( req ) ? "" : req ) )
8387
8488 . Replace ( "{{responseType}}" , GetPayloadType ( res ) )
8589 . Replace ( "{{responseTypeClass}}" , GetPayloadTypeClass ( res ) )
86- . Replace ( "{{response}}" , Encode ( string . IsNullOrEmpty ( res ) ? "" : res ) )
90+ . Replace ( "{{responseHeaders}}" , Encode ( responseHeaders ) )
91+ . Replace ( "{{response}}" , Encode ( string . IsNullOrEmpty ( res ) ? "" : res ) ) ;
8792
88- . Replace ( "{{headers}}" , headers ) ;
93+ // .Replace("{{headers}}", headers);
8994
9095 return BuildLayout ( content ) ;
9196 }
0 commit comments