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?
optionalstatus?:number
Defined in: packages/core/src/http/HttpClient.ts:16
body?
optionalbody?:unknown
Defined in: packages/core/src/http/HttpClient.ts:18
Response body. If object/array, serialized as JSON and Content-Type set automatically.
headers?
optionalheaders?:Record<string,string>
Defined in: packages/core/src/http/HttpClient.ts:19