Condividi tramite


HttpCookieManager Classe

Definizione

Aggiungere o eliminare un httpCookie o visualizzare i cookie associati a un'app.

public ref class HttpCookieManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpCookieManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class HttpCookieManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpCookieManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class HttpCookieManager
Public NotInheritable Class HttpCookieManager
Ereditarietà
Object Platform::Object IInspectable HttpCookieManager
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v1.0)

Commenti

L'oggetto HttpCookieManager viene usato per aggiungere o eliminare un oggetto HttpCookie o visualizzare i cookie associati a un'app.

La proprietà CookieManager in HttpBaseProtocolFilter restituisce un oggetto HttpCookieManager. Per costruire un oggetto HttpCookieManager, viene creato un oggetto HttpBaseProtocolFilter e quindi la proprietà CookieManager in HttpBaseProtocolFilter restituisce l'oggetto HttpCookieManager.

Metodi

DeleteCookie(HttpCookie)

Eliminare un httpCookie dai cookie associati a un'app.

GetCookies(Uri)

Ottiene un oggetto HttpCookieCollection contenente le istanze HttpCookie associate a un URI specifico.

SetCookie(HttpCookie)

Aggiungere o modificare un httpCookie nei cookie associati a un'app inviata alle richieste future.

SetCookie(HttpCookie, Boolean)

Aggiungere o modificare un httpCookie nei cookie associati a un'app.

Si applica a

Vedi anche