Mime ParserParse Headers Async Method
Asynchronously parse a list of headers from the stream.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The parsed list of headers.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task<HeaderList> ParseHeadersAsync(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskHeaderListThe parsed list of headers.
Implements
IMimeParserParseHeadersAsync(CancellationToken)Remarks
Asynchronously parses a list of headers from the stream.
Exceptions
| OperationCanceledException | The operation was canceled via the cancellation token. |
| FormatException | There was an error parsing the headers. |
| IOException | An I/O error occurred. |