共用方式為


FormPostHttpBody.ContentType 屬性

取得值,這個值表示所傳送之資料的內容類型。

命名空間:  Microsoft.VisualStudio.TestTools.WebTesting
組件:  Microsoft.VisualStudio.QualityTools.WebTestFramework (在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

語法

'宣告
Public ReadOnly Property ContentType As String
public string ContentType { get; }
public:
virtual property String^ ContentType {
    String^ get () sealed;
}
abstract ContentType : string with get
override ContentType : string with get
final function get ContentType () : String

屬性值

型別:System.String
表示內容類型的值。

實作

IHttpBody.ContentType

備註

如果有任何檔案上傳參數,則內容類型是多重型別/表單資料,'multipart/form-data'。否則,內容類型是經過 URL 編碼的,即 'application/x-www-form-urlencoded'。

.NET Framework 安全性

請參閱

參考

FormPostHttpBody 類別

Microsoft.VisualStudio.TestTools.WebTesting 命名空間