Web.HTTPApp.TWebResponse.ContentType

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

property ContentType: string index 8 read GetStringVariable write SetStringVariable;

C++

__property System::UnicodeString ContentType = {read=GetStringVariable, write=SetStringVariable, index=8};

プロパティ

種類 可視性 ソース ユニット
property public
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp TWebResponse

説明

HTTP レスポンスメッセージの Content のメディアタイプを示します。

ContentType プロパティを設定すると,HTTP レスポンスメッセージの Content のメディアタイプを指定できます。ContentType の値には,有効な MIME コンテンツタイプを指定しなくてはなりません。ContentType 文字列の形式は Type/SubType です。

たとえば,GET リクエストに対する HTTP レスポンスメッセージとして HTML コマンドからなる文字列を Web クライアントに返す場合,ContentType は text/html になります。

メモ:  HTTP リクエストメッセージに Accept ヘッダーが含まれている場合,ContentType は,TWebRequestAccept プロパティにリストされている内容タイプのうちのいずれかになります。

関連項目