JSPM

http-method-enum

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15710
  • Score
    100M100P100Q131015F
  • License MIT

HTTP methods as a TypeScript enum.

Package Exports

  • http-method-enum

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-method-enum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

http-method-enum

HTTP methods as a TypeScript enum.

tslint: Slick code style: Prettier npm semantic-release License

Install

$ npm install http-method-enum

Usage

Node.js / CommonJS:

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

ESNext / 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'

News and Updates

Follow @typeslick on Twitter for the latest updates and new project announcements.

Sponsors

Maintainers

License

MIT