HttpContentHeaderCollection.ContentLocation Propiedad

Definición

Obtiene o establece el valor del encabezado HTTP Content-Location en el contenido HTTP.

public:
 property Uri ^ ContentLocation { Uri ^ get(); void set(Uri ^ value); };
Uri ContentLocation();

void ContentLocation(Uri value);
public System.Uri ContentLocation { get; set; }
var uri = httpContentHeaderCollection.contentLocation;
httpContentHeaderCollection.contentLocation = uri;
Public Property ContentLocation As Uri

Valor de propiedad

Valor del encabezado HTTP Content-Location en el contenido HTTP. Un valor NULL significa que el encabezado no está presente.

Comentarios

En el código de ejemplo siguiente se muestra un método para obtener o establecer el valor del encabezado Content-Location en el contenido HTTP mediante la propiedad ContentLocation en el objeto HttpContentHeaderCollection .

// Content-Location header
// Uri
void DemoContentLocation(IHttpContent content) {
    var h = content.Headers;

    h.ContentLocation = new Uri("http://example.com/");

    var header = h.ContentLocation;
    uiLog.Text += "\nCONTENT LOCATION HEADER\n";

    uiLog.Text += string.Format("ContentLocation: ToString: {0}\n\n", header.ToString());
}

Se aplica a

Consulte también