> For the complete documentation index, see [llms.txt](https://henryruhs.gitbook.io/ngx-crud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://henryruhs.gitbook.io/ngx-crud/api/http-context.md).

# HTTP Context

### Get

Get the context by token:

```typescript
crudService.getContextByToken(token : HttpContextToken<Context>) : HttpContext
```

Get the context instance of the service:

```typescript
crudService.getContext() : HttpContext
```

### Set

Set the context by token:

```typescript
crudService.setContextByToken(token : HttpContextToken<Context>, value : Context) : this
```

Set the context instance of the service:

```typescript
crudService.setContext(context : HttpContext) : this
```

### Clear

Clear the context by token:

```typescript
crudService.clearContextByToken(token : HttpContextToken<Context>) : this
```

Clear the context instance of the service:

```typescript
crudService.clearContext() : this
```
