# http-method-enum

> HTTP methods as a TypeScript enum.

Latest version **1.0.0** (published 2019-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install http-method-enum
pnpm add http-method-enum
yarn add http-method-enum
bun add http-method-enum
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-02-20 |
| First published | 2019-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jayrylan |
| Keywords | http, method, enum, typescript |

## Links

- npm: https://www.npmjs.com/package/http-method-enum
- Repository: https://github.com/typeslick/http-method-enum
- Issues: https://github.com/typeslick/http-method-enum/issues
- npm.io page: https://npm.io/package/http-method-enum

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-02-20

## README

# http-method-enum

HTTP methods as a TypeScript enum.

[![tslint: Slick](https://img.shields.io/badge/tslint-slick-3a6b93.svg?style=flat-square)](https://github.com/typeslick/tslint-slick)
[![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm](https://img.shields.io/npm/v/http-method-enum.svg?style=flat-square)](https://npmjs.org/package/http-method-enum)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/typeslick/http-method-enum/blob/master/LICENSE)

## Install

```sh
$ npm install http-method-enum
```

## Usage

Node.js / CommonJS:

```typescript
const { HTTPMethod } = require('http-method-enum')
```

ESNext / TypeScript:

```typescript
import { StatusCode } from 'http-method-enum'

if (res.method = HTTPMethod.GET) {
  // ...
}
```

### All current standard HTTP methods are available as follows:

  - CONNECT = 'CONNECT'
  - DELETE = 'DELETE'
  - GET = 'GET'
  - HEAD = 'HEAD'
  - OPTIONS = 'OPTIONS'
  - PATCH = 'PATCH'
  - POST = 'POST'
  - PUT = 'PUT'
  - TRACE = 'TRACE'

## Related

- [http-method-enum](https://github.com/typeslick/http-method-enum)
- [enum-utils](https://github.com/typeslick/enum-utils)

## News and Updates

[Follow @typeslick on Twitter](https://twitter.com/typeslick) for the latest updates and new project announcements.

## Sponsors

- [Loomble](https://loomble.com/)

## Maintainers

- [Jay Rylan](https://jayrylan.com/)

## License

[MIT](https://github.com/typeslick/http-method-enum/blob/master/LICENSE)

---
_Source: https://npm.io/package/http-method-enum · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
