Class
HtmlContent
Provides HTTP content based on HTML contents.
public class HtmlContent : StringContent, IDisposableInheritance #
object ← HttpContent ← ByteArrayContent ← StringContent ← HtmlContent
Implements #
Inherited Members #
StringContent.SerializeToStreamAsync(Stream, TransportContext?, CancellationToken), ByteArrayContent.SerializeToStream(Stream, TransportContext?, CancellationToken), ByteArrayContent.SerializeToStreamAsync(Stream, TransportContext?), ByteArrayContent.SerializeToStreamAsync(Stream, TransportContext?, CancellationToken), ByteArrayContent.TryComputeLength(out long), ByteArrayContent.CreateContentReadStream(CancellationToken), ByteArrayContent.CreateContentReadStreamAsync(), HttpContent.ReadAsStringAsync(), HttpContent.ReadAsStringAsync(CancellationToken), HttpContent.ReadAsByteArrayAsync(), HttpContent.ReadAsByteArrayAsync(CancellationToken), HttpContent.ReadAsStream(), HttpContent.ReadAsStream(CancellationToken), HttpContent.ReadAsStreamAsync(), HttpContent.ReadAsStreamAsync(CancellationToken), HttpContent.SerializeToStreamAsync(Stream, TransportContext?), HttpContent.SerializeToStream(Stream, TransportContext?, CancellationToken), HttpContent.SerializeToStreamAsync(Stream, TransportContext?, CancellationToken), HttpContent.CopyTo(Stream, TransportContext?, CancellationToken), HttpContent.CopyToAsync(Stream), HttpContent.CopyToAsync(Stream, CancellationToken), HttpContent.CopyToAsync(Stream, TransportContext?), HttpContent.CopyToAsync(Stream, TransportContext?, CancellationToken), HttpContent.LoadIntoBufferAsync(), HttpContent.LoadIntoBufferAsync(long), HttpContent.LoadIntoBufferAsync(CancellationToken), HttpContent.LoadIntoBufferAsync(long, CancellationToken), HttpContent.CreateContentReadStream(CancellationToken), HttpContent.CreateContentReadStreamAsync(), HttpContent.CreateContentReadStreamAsync(CancellationToken), HttpContent.TryComputeLength(out long), HttpContent.Dispose(bool), HttpContent.Dispose(), HttpContent.Headers, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors #
| Name | Description |
|---|---|
| HtmlContent(string, Encoding) | Creates an new HtmlContent class with given HTML content and encoding. |
| HtmlContent(string) | Creates an new HtmlContent class with given HTML content, using the environment default encoding. |
| HtmlContent(ReadOnlySpan<byte>, Encoding) | Creates a new HtmlContent class with given HTML content as a byte span and encoding. |
| HtmlContent(ReadOnlySpan<byte>) | Creates a new HtmlContent class with given HTML content as a UTF-8 encoded byte span. |