HttpListenerResponse.ContentType 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
반환된 콘텐츠의 MIME 형식을 가져오거나 설정합니다.
public:
property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };
public string? ContentType { get; set; }
public string ContentType { get; set; }
member this.ContentType : string with get, set
Public Property ContentType As String
속성 값
응답의 Content-Type
헤더 텍스트가 들어 있는 String 인스턴스입니다.
예외
Set 작업에 대해 지정된 값이 null
입니다.
set 작업에 지정된 값이 빈 문자열("")인 경우
이 개체가 닫혀 있는 경우
설명
웹 브라우저와 통신할 때 이외의 콘텐츠 형식 text/html
을 반환할 때 이 속성을 명시적으로 설정해야 합니다.
응답 헤더의 전체 목록은 열거형을 HttpResponseHeader 참조하세요.