ln.protocols.helper/Request.cs

39 lines
1.0 KiB
C#

using System;
using System.Net;
namespace ln.protocols.helper
{
public class Request : IDisposable
{
public virtual string Method { get; internal set; }
public virtual string Protocol { get; internal set; }
public virtual string RequestUri { get; internal set; }
public IPAddress ClientAddress { get; internal set; }
public HeaderContainer Headers { get; protected set; }
public RequestContentStream ContentStream { get; internal set; }
public Request()
{
Headers = new HeaderContainer();
}
protected Request(HeaderContainer headers)
{
Headers = headers;
}
public Request(string method, string requestUri, string protocol)
{
Method = method;
RequestUri = requestUri;
Protocol = protocol;
Headers = new HeaderContainer();
}
public void Dispose()
{
ContentStream?.Dispose();
}
}
}