Mime |
public static MimeEntity Load( ContentType contentType, Stream content, CancellationToken cancellationToken = default )
| Exception | Condition |
|---|---|
| ArgumentNullException | contentType is . -or- content is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| FormatException | There was an error parsing the entity. |
| IOException | An I/O error occurred. |
MimeEntity ParseMultipartFormData (HttpWebResponse response)
{
var contentType = ContentType.Parse (response.ContentType);
return MimeEntity.Load (contentType, response.GetResponseStream ());
}