• Overview
@angular/common/http

HttpContext

Class

Http context stores arbitrary user defined values and ensures type safety without actually knowing the types. It is backed by a Map and guarantees that keys do not clash.

  
    class HttpContext {}
  
  

Store a value in the context. If a value is already present it will be overwritten.

@paramtokenHttpContextToken<T>

The reference to an instance of HttpContextToken.

@paramvalueT

The value to store.

@returnsHttpContext

get

T

Retrieve the value associated with the given token.

@paramtokenHttpContextToken<T>

The reference to an instance of HttpContextToken.

@returnsT

Delete the value associated with the given token.

@paramtokenHttpContextToken<unknown>

The reference to an instance of HttpContextToken.

@returnsHttpContext

has

boolean

Checks for existence of a given token.

@paramtokenHttpContextToken<unknown>

The reference to an instance of HttpContextToken.

@returnsboolean

keys

IterableIterator<HttpContextToken<unknown>>
@returnsIterableIterator<HttpContextToken<unknown>>
Jump to details