Skip to content

Commit

Permalink
There is now a Request as well as response header.
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy1981 committed Nov 26, 2010
1 parent 06e8a5e commit fb63d8c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 17 deletions.
4 changes: 3 additions & 1 deletion Fiddler/FiddlerJsonViewer.csproj
Expand Up @@ -44,7 +44,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="JsonInspector.cs" />
<Compile Include="JsonInspectorBase.cs" />
<Compile Include="JsonRequestInspector.cs" />
<Compile Include="JsonResponseInspector.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
24 changes: 8 additions & 16 deletions Fiddler/JsonInspector.cs → Fiddler/JsonInspectorBase.cs
Expand Up @@ -9,11 +9,15 @@

namespace EPocalipse.Json.Fiddler
{
public class JsonInspector : Inspector2, IResponseInspector2




public abstract class JsonInspectorBase : Inspector2
{
protected HTTPHeaders _headers;
private byte[] _body;
JsonViewer viewer;
HTTPResponseHeaders _headers;
private JsonViewer viewer;

public override void AddToTab(TabPage tabPage)
{
Expand All @@ -35,7 +39,7 @@ public override int ScoreForContentType(string sMIMEType)
return 50;
}
return 0;
}
}

public override int GetOrder()
{
Expand Down Expand Up @@ -100,18 +104,6 @@ public byte[] body
}
}

public HTTPResponseHeaders headers
{
get
{
return null;
}
set
{
_headers = value;
}
}

public override void SetFontSize(float flSizeInPoints)
{
viewer.Font = new Font(viewer.Font.FontFamily, flSizeInPoints, FontStyle.Regular, GraphicsUnit.Point);
Expand Down
26 changes: 26 additions & 0 deletions Fiddler/JsonRequestInspector.cs
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;
using EPocalipse.Json.Viewer;
using Fiddler;
using System.Drawing;

namespace EPocalipse.Json.Fiddler
{
public sealed class JsonRequestInspector: JsonInspectorBase, IRequestInspector2
{
public HTTPRequestHeaders headers
{
get
{
return null;
}
set
{
_headers = value;
}
}
}
}
26 changes: 26 additions & 0 deletions Fiddler/JsonResponseInspector.cs
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;
using EPocalipse.Json.Viewer;
using Fiddler;
using System.Drawing;

namespace EPocalipse.Json.Fiddler
{
public sealed class JsonResponseInspector: JsonInspectorBase, IResponseInspector2
{
public HTTPResponseHeaders headers
{
get
{
return null;
}
set
{
_headers = value;
}
}
}
}

0 comments on commit fb63d8c

Please sign in to comment.