belgattitude/httpx

View on GitHub
packages/assert/docs/api/http.asserts/functions/assertHttpValidMethod.md

Summary

Maintainability
Test Coverage
[**@httpx/assert v0.12.4**](../../README.md) • **Docs**

***

[@httpx/assert v0.12.4](../../README.md) / [http.asserts](../README.md) / assertHttpValidMethod

# Function: assertHttpValidMethod()

> **assertHttpValidMethod**(`v`, `msgOrErrorFactory`?): `asserts v is HttpMethod`

Assert the value is a valid http method (case-insensitive)

## Parameters

• **v**: `unknown`

• **msgOrErrorFactory?**: `MsgOrErrorFactory`

## Returns

`asserts v is HttpMethod`

## Throws

TypeError

## Defined in

[http.asserts.ts:10](https://github.com/belgattitude/httpx/blob/acde85be3548fccd6cc1a311d7f8d4419e2b6ce0/packages/assert/src/http.asserts.ts#L10)