HttpResponseMessageProperty Classe
Definição
Fornece acesso à resposta HTTP para acessar e responder às informações adicionais disponibilizadas para solicitações por meio do protocolo HTTP.Provides access to the HTTP response in order to access and respond to the additional information made available for requests over the HTTP protocol.
public ref class HttpResponseMessageProperty sealed : System::ServiceModel::Channels::IMessageProperty
public ref class HttpResponseMessageProperty sealed
public sealed class HttpResponseMessageProperty : System.ServiceModel.Channels.IMessageProperty
public sealed class HttpResponseMessageProperty
type HttpResponseMessageProperty = class
interface IMessageProperty
type HttpResponseMessageProperty = class
Public NotInheritable Class HttpResponseMessageProperty
Implements IMessageProperty
Public NotInheritable Class HttpResponseMessageProperty
- Herança
-
HttpResponseMessageProperty
- Implementações
Exemplos
Isso mostra como usar criar uma instância da HttpResponseProperty classe e modificar alguns de seus membros:This shows how to use create an instance of the HttpResponseProperty class and modify some of its members:
HttpResponseMessageProperty responseProperty =
new HttpResponseMessageProperty();
responseProperty.StatusCode = HttpStatusCode.OK;
responseProperty.Headers.Add(
HttpResponseHeader.ContentType,
"text/html; charset=UTF-8");
Comentários
Essa é uma classe de finalidade geral que fornece acesso direto às informações de resposta HTTP, que podem ser usadas para encapsulamento de informações específicas de HTTP.This is a general-purpose class that gives you direct access to the HTTP response information, which could be used for encapsulation of HTTP-specific information. Um uso dessa classe é para dar suporte a serviços implementados de acordo com a arquitetura REST (Representational estado Transfer).One use of this class is to support services implemented in accordance with the Representational State Transfer (REST) architecture.
Essa classe permite que você dê suporte aos seguintes cenários:This class enables you to support the following scenarios:
Controla se um corpo de entidade é transmitido.Controls whether an entity body is transmitted.
Permite que os pares de cabeçalho HTTP (chave, valor) sejam definidos para cada resposta.Allows HTTP header (key, value) pairs to be set for each response.
Varia o código de status e a descrição de status usados para cada resposta.Varies the status code and status description used for each response.
Essa classe pode ser usada pelo HttpTransportBindingElement e por classes relacionadas.This class can be used by HttpTransportBindingElement and related classes.
Construtores
| HttpResponseMessageProperty() |
Inicializa uma nova instância da classe HttpResponseMessageProperty.Initializes a new instance of the HttpResponseMessageProperty class. |
Propriedades
| Headers |
Obtém os cabeçalhos HTTP da resposta HTTP.Gets the HTTP headers from the HTTP response. |
| Name |
Obtém o nome da propriedade de mensagem associado à classe HttpResponseMessageProperty.Gets the name of the message property associated with the HttpResponseMessageProperty class. |
| StatusCode |
Obtém ou define o código de status da resposta HTTP atual à qual esta propriedade está anexada.Gets or sets the status code of the current HTTP response to which this property is attached. |
| StatusDescription |
Obtém ou define a descrição do código de status da resposta HTTP atual à qual esta propriedade está anexada.Gets or sets the description of the status code of the current HTTP response to which this property is attached. |
| SuppressEntityBody |
Obtém ou define um valor que indica se o corpo da mensagem é ignorado e uma mensagem vazia é enviada.Gets or sets a value that indicates whether the body of the message is ignored and an empty message is sent. |
| SuppressPreamble |
Obtém ou define se o preâmbulo da mensagem é suprimido.Gets or sets whether the message preamble is suppressed. |
Métodos
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |
Implantações explícitas de interface
| IMessageProperty.CreateCopy() |
Cria uma nova cópia da instância atual.Creates a new copy of the current instance. |