HttpWebRequest.MediaType Propriedade

Definição

Obtém ou define o tipo de mídia da solicitação.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

Valor da propriedade

String

O tipo de mídia da solicitação.The media type of the request. O valor padrão é null.The default value is null.

Comentários

O valor da MediaType propriedade afeta a CharacterSet propriedade.The value of the MediaType property affects the CharacterSet property. Quando você define o MediaType na solicitação, o tipo de mídia correspondente é escolhido na lista de conjuntos de caracteres retornados no Content-type cabeçalho HTTP de resposta.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.

Aplica-se a