How to distinguish if a response is a HTML or a file? For example, if I request an HTML file from a server(which is built based on SharePoint), the response.ContentType is 'text/html'.
So how to check if the server returns a file or a page? Should I check ContentType property?
Thanks in advance!
All sharepoint pages will have a charset defined with the contenttype. Additionally, no SharePoint pages have a filetype of .htm/.html. For binary file types (other than media and txt) will typically come back as application/octet-stream.