# HttpProtect.connect() method · @imqueue/http-protect

Source: https://imqueue.org/api/http-protect/latest/http-protect.httpprotect.connect/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/http-protect 3.0.1 — generated reference, not hand-written

Opens a Redis connection and adopts it as this instance's client.

**Signature:**

```typescript
connect(options?: RedisOptions): Redis;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| options | RedisOptions | _(Optional)_ ioredis options; omitted means `localhost:6379` |


**Returns:**

Redis

The newly created client, which is also stored on this instance.

## Remarks

Called by the constructor when no client was supplied. Calling it again replaces the current client without disconnecting the old one, so a repeat call leaks a connection — use it to reconnect after [HttpProtect.destroy()](https://imqueue.org/api/http-protect/latest/http-protect.httpprotect.destroy/), not to reconfigure a live instance.

