取得或設定要求訊息的 Content-Type 標頭。
命名空間: System.Data.Services.Client
組件: Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)
語法
'宣告
Public Property ContentType As String
Get
Set
'用途
Dim instance As DataServiceRequestArgs
Dim value As String
value = instance.ContentType
instance.ContentType = value
public string ContentType { get; set; }
public:
property String^ ContentType {
String^ get ();
void set (String^ value);
}
member ContentType : string with get, set
function get ContentType () : String
function set ContentType (value : String)
屬性值
型別:System.String
Content-Type 標頭的值。
備註
不會對 ContentType 屬性的值執行任何驗證。 因此,請確認所提供的值是 HTTP Content-Type 標頭的有效值。