---
url: https://haihv.github.io/valifetch/api/types/type-aliases/MockCall.md
---

# Type Alias: MockCall

> **MockCall** = `object`

Defined in: [src/mock/types.ts:7](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L7)

A recorded request intercepted by the mock.
Inspect these via `mock.calls()` and `mock.lastCall()` to assert on what was sent.

## Properties

### body

> **body**: `unknown`

Defined in: [src/mock/types.ts:20](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L20)

Parsed request body.
JSON-parsed object/array when `Content-Type` is `application/json`,
decoded text for every other body (including raw `body` payloads),
`null` when the request has no body.

***

### headers

> **headers**: `Record`<`string`, `string`>

Defined in: [src/mock/types.ts:13](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L13)

Request headers as a plain string-to-string object

***

### method

> **method**: [`HttpMethod`](../../index/type-aliases/HttpMethod.md)

Defined in: [src/mock/types.ts:9](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L9)

HTTP method of the intercepted request

***

### searchParams

> **searchParams**: `URLSearchParams`

Defined in: [src/mock/types.ts:22](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L22)

URL search/query parameters

***

### url

> **url**: `string`

Defined in: [src/mock/types.ts:11](https://github.com/haihv/valifetch/blob/285835d38a6676b98d2ee1a93e23166c6c834cb2/src/mock/types.ts#L11)

Full URL of the intercepted request
