Skip to main content
zerotal

Documentation


Documentation / zerotal / http / FakeStub

Interface: FakeStub

Defined in: packages/core/src/http/HttpClient.ts:13

A fake response definition matched by URL while Http.fake() is active.

Properties

url

url: string

Defined in: packages/core/src/http/HttpClient.ts:15

URL to match — exact string or glob-style * wildcard.


status?

optional status?: number

Defined in: packages/core/src/http/HttpClient.ts:16


body?

optional body?: unknown

Defined in: packages/core/src/http/HttpClient.ts:18

Response body. If object/array, serialized as JSON and Content-Type set automatically.


headers?

optional headers?: Record<string, string>

Defined in: packages/core/src/http/HttpClient.ts:19