Commit b6829121 authored by Honfika's avatar Honfika

BodyString is public, fields moved to the correct positon in the source file

parent 57462094
......@@ -11,6 +11,16 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
public class Request
{
/// <summary>
/// Cached request body as byte array
/// </summary>
private byte[] requestBody;
/// <summary>
/// Cached request body as string
/// </summary>
private string requestBodyString;
/// <summary>
/// Request Method
/// </summary>
......@@ -37,7 +47,7 @@ namespace Titanium.Web.Proxy.Http
public Version HttpVersion { get; set; }
/// <summary>
/// Keeps the response body data after the session is finished
/// Keeps the request body data after the session is finished
/// </summary>
public bool KeepRequestBody { get; set; }
......@@ -171,16 +181,6 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
internal bool CancelRequest { get; set; }
/// <summary>
/// Cached request body as byte array
/// </summary>
private byte[] requestBody;
/// <summary>
/// Cached request body as string
/// </summary>
private string requestBodyString;
/// <summary>
/// Request body as byte array
/// </summary>
......@@ -213,7 +213,7 @@ namespace Titanium.Web.Proxy.Http
/// Request body as string
/// Use the encoding specified in request to decode the byte[] data to string
/// </summary>
internal string RequestBodyString => requestBodyString ?? (requestBodyString = Encoding.GetString(RequestBody));
public string RequestBodyString => requestBodyString ?? (requestBodyString = Encoding.GetString(RequestBody));
/// <summary>
/// Request body was read by user?
......
......@@ -11,6 +11,16 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
public class Response
{
/// <summary>
/// Cached response body content as byte array
/// </summary>
private byte[] responseBody;
/// <summary>
/// Cached response body as string
/// </summary>
private string responseBodyString;
/// <summary>
/// Response Status Code.
/// </summary>
......@@ -158,16 +168,6 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
public HeaderCollection ResponseHeaders { get; } = new HeaderCollection();
/// <summary>
/// Cached response body content as byte array
/// </summary>
private byte[] responseBody;
/// <summary>
/// Cached response body as string
/// </summary>
private string responseBodyString;
/// <summary>
/// Response body as byte array
/// </summary>
......@@ -195,7 +195,7 @@ namespace Titanium.Web.Proxy.Http
/// Response body as string
/// Use the encoding specified in response to decode the byte[] data to string
/// </summary>
internal string ResponseBodyString => responseBodyString ?? (responseBodyString = Encoding.GetString(ResponseBody));
public string ResponseBodyString => responseBodyString ?? (responseBodyString = Encoding.GetString(ResponseBody));
/// <summary>
/// Was response body read by user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment