http-core-constants
v1.3.0
Published
http-core constants typescript/javascript version (from apache http-components:httpcore)
Downloads
1,985
Maintainers
Readme
Node Http Constants
Provide http-constants: (standard)headers and status code from java version org.apache.httpcomponents:httpcore
Usage
import { HttpHeaders, HttpStatus, HttpRequestMethod } from 'http-core-constants';
console.log(HttpHeaders.ACCEPT); // output: Accept
console.log(HttpStatus.SC_OK); // output: 200 (constants with `SC` prefix same as apache core constants)
console.log(HttpStatus.OK); // output: 200
console.log(HttpRequestMethod.GET); // output: GET