HttpWebRequest.MediaType 屬性
定義
取得或設定要求的媒體類型。Gets or sets the media type of the request.
public:
property System::String ^ MediaType { System::String ^ get(); void set(System::String ^ value); };
public string? MediaType { get; set; }
public string MediaType { get; set; }
member this.MediaType : string with get, set
Public Property MediaType As String
屬性值
要求的媒體類型。The media type of the request. 預設值是 null
。The default value is null
.
備註
屬性(property)的值 MediaType 會影響 CharacterSet 屬性(property)。The value of the MediaType property affects the CharacterSet property. 當您 MediaType 在要求中設定時,會從回應 HTTP 標頭中傳回的字元集清單中選擇對應的媒體類型 Content-type
。When you set the MediaType in the request, the corresponding media type is chosen from the list of character sets returned in the response Content-type
HTTP header.