Class Header
public abstract class Header
- Inheritance
-
Header
- Derived
- Inherited Members
Constructors
Header(IEnumerable<HeaderField>)
protected Header(IEnumerable<HeaderField> headerFields)
Parameters
headerFields
IEnumerable<HeaderField>
Header(ReadOnlyMemory<char>, bool)
protected Header(ReadOnlyMemory<char> rawHeader, bool isSecure)
Parameters
rawHeader
ReadOnlyMemory<char>isSecure
bool
Fields
CloseFlatHeader
protected static readonly byte[] CloseFlatHeader
Field Value
- byte[]
KeepAliveFlatHeader
protected static readonly byte[] KeepAliveFlatHeader
Field Value
- byte[]
Properties
ChunkedBody
If transfer-encoding chunked is defined
public bool ChunkedBody { get; }
Property Value
ContentLength
Content length of body. -1 if undefined
public long ContentLength { get; set; }
Property Value
HeaderFields
Returns all headers, including non-forwardable
public IReadOnlyCollection<HeaderField> HeaderFields { get; }
Property Value
Headers
Returns all headers, excluding non-forwardable
public IEnumerable<HeaderField> Headers { get; }
Property Value
this[ReadOnlyMemory<char>]
public IEnumerable<HeaderField> this[ReadOnlyMemory<char> key] { get; }
Parameters
key
ReadOnlyMemory<char>
Property Value
Methods
AltAddHeader(string, string)
public void AltAddHeader(string name, string value)
Parameters
AltDeleteHeader(string)
public void AltDeleteHeader(string name)
Parameters
name
string
AltReplaceHeaders(string, string, bool, string?)
public void AltReplaceHeaders(string name, string value, bool addIfAbsent, string? appendSeparator = null)
Parameters
GetHeaderLineLength()
protected abstract int GetHeaderLineLength()
Returns
GetHttp11Header()
public ReadOnlyMemory<char> GetHttp11Header()
Returns
GetHttp11LengthOnly(bool, bool)
public int GetHttp11LengthOnly(bool skipNonForwardableHeader, bool shouldClose)
Parameters
Returns
RemoveHeader(string)
public void RemoveHeader(string headerName)
Parameters
headerName
string
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteHeaderLine(Span<byte>)
protected abstract int WriteHeaderLine(Span<byte> buffer)
Parameters
Returns
WriteHttp11(RsBuffer, bool, bool, bool)
public int WriteHttp11(RsBuffer buffer, bool skipNonForwardableHeader, bool writeExtraHeaderField = false, bool requestClose = true)
Parameters
Returns
WriteHttp11(in Span<byte>, bool, bool, bool)
public int WriteHttp11(in Span<byte> data, bool skipNonForwardableHeader, bool writeExtraHeaderField = false, bool writeKeepAlive = false)
Parameters
Returns
WriteHttp2(in Span<byte>, bool, bool)
public int WriteHttp2(in Span<byte> data, bool skipNonForwardableHeader, bool writeExtraHeaderField = false)