HttpResponseMessage Clase
Definición
Representa un mensaje de respuesta HTTP incluido el código de estado y los datos.Represents a HTTP response message including the status code and data.
public ref class HttpResponseMessage : IDisposable
public class HttpResponseMessage : IDisposable
type HttpResponseMessage = class
interface IDisposable
Public Class HttpResponseMessage
Implements IDisposable
- Herencia
-
HttpResponseMessage
- Implementaciones
Comentarios
Una forma habitual de obtener un HttpResponseMessage es de uno de los HttpClient.SendAsync(HttpRequestMessage) métodos.A common way to get an HttpResponseMessage is from one of the HttpClient.SendAsync(HttpRequestMessage) methods.
Constructores
| HttpResponseMessage() |
Inicializa una nueva instancia de la clase HttpResponseMessage.Initializes a new instance of the HttpResponseMessage class. |
| HttpResponseMessage(HttpStatusCode) |
Inicializa una instancia nueva de la clase HttpResponseMessage con un StatusCode específico.Initializes a new instance of the HttpResponseMessage class with a specific StatusCode. |
Propiedades
| Content |
Obtiene o establece el contenido de un mensaje de respuesta HTTP.Gets or sets the content of a HTTP response message. |
| Headers |
Obtiene la colección de encabezados de respuesta HTTP.Gets the collection of HTTP response headers. |
| IsSuccessStatusCode |
Obtiene un valor que indica si la respuesta HTTP se realizó correctamente.Gets a value that indicates if the HTTP response was successful. |
| ReasonPhrase |
Obtiene o establece la frase de motivo que suelen enviar los servidores junto con el código de estado.Gets or sets the reason phrase which typically is sent by servers together with the status code. |
| RequestMessage |
Obtiene o establece el mensaje de solicitud que condujo a este mensaje de respuesta.Gets or sets the request message which led to this response message. |
| StatusCode |
Obtiene o establece el código de estado de la respuesta HTTP.Gets or sets the status code of the HTTP response. |
| TrailingHeaders |
Obtiene la colección de encabezados finales incluidos en una respuesta HTTP.Gets the collection of trailing headers included in an HTTP response. |
| Version |
Obtiene o establece la versión del mensaje HTTP.Gets or sets the HTTP message version. |
Métodos
| Dispose() |
Libera los recursos no administrados y desecha los recursos no administrados que usa HttpResponseMessage.Releases the unmanaged resources and disposes of unmanaged resources used by the HttpResponseMessage. |
| Dispose(Boolean) |
Libera los recursos no administrados que usa el objeto HttpResponseMessage y, de forma opcional, desecha los recursos administrados.Releases the unmanaged resources used by the HttpResponseMessage and optionally disposes of the managed resources. |
| EnsureSuccessStatusCode() |
Inicia una excepción si la propiedad IsSuccessStatusCode para la respuesta HTTP es |
| Equals(Object) |
Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object. (Heredado de Object) |
| GetHashCode() |
Sirve como la función hash predeterminada.Serves as the default hash function. (Heredado de Object) |
| GetType() |
Obtiene el Type de la instancia actual.Gets the Type of the current instance. (Heredado de Object) |
| MemberwiseClone() |
Crea una copia superficial del Object actual.Creates a shallow copy of the current Object. (Heredado de Object) |
| ToString() |
Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object. |
Métodos de extensión
| ToMessage(HttpResponseMessage) |
Crea una instancia de Message a partir de una instancia de HttpResponseMessage.Creates a Message instance from an HttpResponseMessage instance. |