---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/testing/interfaces/MockRequest.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/testing](../index.md) / MockRequest

# MockRequest

Request received by a [MockHandler](../type-aliases/MockHandler.md).

## Properties

### body

> **body**: `unknown`

Body already decoded as JSON; for a multipart request (e.g. `kyc.uploadDocument`), the
`FormData` itself; `undefined` when the request has no body.

***

### headers

> **headers**: `Headers`

Headers sent by the client, including `authorization` when the route requires a session.

***

### method

> **method**: `string`

HTTP method, uppercase.

***

### params?

> `optional` **params?**: `Record`<`string`, `string`>

Values of the `:name` segments of the matched route (already decoded), e.g. `{ depositId: 'dep-1' }`
for `'GET /api/v1/deposits/:depositId'`. `createMockFetch` always fills it in (`{}` on routes without
parameters); it is optional in the type only so as not to break whoever builds a `MockRequest` by hand.

***

### url

> **url**: `URL`

Request URL, resolved against a fixed origin when `baseUrl` is relative.
