HttpRequest.ContentType 속성

정의

들어오는 요청의 MIME 콘텐츠 형식을 가져오거나 설정합니다.

public:
 property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };
public string ContentType { get; set; }
member this.ContentType : string with get, set
Public Property ContentType As String

속성 값

들어오는 요청의 MIME 콘텐츠 형식(예: "text/html")을 나타내는 문자열입니다. 추가적인 일반적인 MIME 형식으로는 "audio.wav", "image/gif" 및 "application/pdf"가 있습니다.

예제

다음 코드 예제에서는 들어오는 요청의 콘텐츠 형식을 나타내는 값을 문자열 변수에 할당합니다.

String str;
 str = Request.ContentType;

Dim str As String
 str = Request.ContentType
   

다음 예제에서는 이 코드에서 생성할 수 있는 출력을 보여 있습니다.

GET

127.0.0.1

127.0.0.1

GET

적용 대상