←Select platform

HasContentType Property

Summary

Indicates whether this object has obtained the content type of the opened URL.

Syntax
C#
public bool HasContentType { get; } 

Property Value

true if this object has obtained the content type of the opened URL; otherwise, false. Default value is false.

Remarks

When Open is called, the object will try to read content type (media type) of the data in the URL from the HTTP headers. If the value is available, it will be set in HttpClientLeadStream.ContentType and the value of HttpClientLeadStream.HasContentType will be set to true. If the value is not available, then HttpClientLeadStream.ContentType will be null and HttpClientLeadStream.HasContentType will be set to false. For instance, if the data in the URL is pointing to a JPEG file (such as http://example.org/file.jpg), then ContentType will be "image/jpeg".

Requirements

A reference to Leadtools.Async.dll is required to use this functionality.

Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.