packages/assert/docs/api/http.asserts/functions/assertHttpMethod.md
[**@httpx/assert v0.12.4**](../../README.md) • **Docs**
***
[@httpx/assert v0.12.4](../../README.md) / [http.asserts](../README.md) / assertHttpMethod
# Function: assertHttpMethod()
> **assertHttpMethod**\<`T`\>(`method`, `v`, `msgOrErrorFactory`?): `asserts v is T`
## Type Parameters
• **T** *extends* [`HttpMethod`](../../http.types/type-aliases/HttpMethod.md)
## Parameters
• **method**: `T`
• **v**: `unknown`
• **msgOrErrorFactory?**: `MsgOrErrorFactory`
## Returns
`asserts v is T`
## Throws
TypeError
## Defined in
[http.asserts.ts:25](https://github.com/belgattitude/httpx/blob/acde85be3548fccd6cc1a311d7f8d4419e2b6ce0/packages/assert/src/http.asserts.ts#L25)