http-toolkit
Version:
Well-documented toolkit for making elegant HTTP requests with JavaScript
118 lines (115 loc) • 3.92 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.HttpHeader = void 0;
/**
* @module HttpHeader
* @category Models and Constants
*/
/**
* Common Http Headers
* @readonly
* @example HttpHeader.ACCEPT
* @property {string} ACCEPT 'Accept'
* @property {string} CONTENT_TYPE 'Content-Type'
* @property {string} AUTHORIZATION 'Authorization'
* @property {string} FORWARDED 'Forwarded'
* @property {string} ACCESS_CONTROL_ALLOW_HEADERS 'Access-Control-Allow-Headers'
* @property - and many more.
*/
var HttpHeader = {
CACHE_CONTROL: 'Cache-Control',
CONTENT_LENGTH: 'Content-Length',
CONTENT_TYPE: 'Content-Type',
DATE: 'Date',
PRAGMA: 'Pragma',
VIA: 'Via',
WARNING: 'Warning',
ACCEPT: 'Accept',
ACCEPT_CHARSET: 'Accept-Charset',
ACCEPT_ENCODING: 'Accept-Encoding',
ACCEPT_LANGUAGE: 'Accept-Language',
ACCESS_CONTROL_REQUEST_HEADERS: 'Access-Control-Request-Headers',
ACCESS_CONTROL_REQUEST_METHOD: 'Access-Control-Request-Method',
AUTHORIZATION: 'Authorization',
CONNECTION: 'Connection',
COOKIE: 'Cookie',
EXPECT: 'Expect',
FROM: 'From',
FORWARDED: 'Forwarded',
FOLLOW_ONLY_WHEN_PRERENDER_SHOWN: 'Follow-Only-When-Prerender-Shown',
HOST: 'Host',
IF_MATCH: 'If-Match',
IF_MODIFIED_SINCE: 'If-Modified-Since',
IF_NONE_MATCH: 'If-None-Match',
IF_RANGE: 'If-Range',
IF_UNMODIFIED_SINCE: 'If-Unmodified-Since',
LAST_EVENT_ID: 'Last-Event-ID',
MAX_FORWARDS: 'Max-Forwards',
ORIGIN: 'Origin',
PROXY_AUTHORIZATION: 'Proxy-Authorization',
RANGE: 'Range',
REFERER: 'Referer',
SERVICE_WORKER: 'Service-Worker',
TE: 'TE',
UPGRADE: 'Upgrade',
USER_AGENT: 'User-Agent',
ACCEPT_RANGES: 'Accept-Ranges',
ACCESS_CONTROL_ALLOW_HEADERS: 'Access-Control-Allow-Headers',
ACCESS_CONTROL_ALLOW_METHODS: 'Access-Control-Allow-Methods',
ACCESS_CONTROL_ALLOW_ORIGIN: 'Access-Control-Allow-Origin',
ACCESS_CONTROL_ALLOW_CREDENTIALS: 'Access-Control-Allow-Credentials',
ACCESS_CONTROL_EXPOSE_HEADERS: 'Access-Control-Expose-Headers',
ACCESS_CONTROL_MAX_AGE: 'Access-Control-Max-Age',
AGE: 'Age',
ALLOW: 'Allow',
CONTENT_DISPOSITION: 'Content-Disposition',
CONTENT_ENCODING: 'Content-Encoding',
CONTENT_LANGUAGE: 'Content-Language',
CONTENT_LOCATION: 'Content-Location',
CONTENT_MD5: 'Content-MD5',
CONTENT_RANGE: 'Content-Range',
CONTENT_SECURITY_POLICY: 'Content-Security-Policy',
CONTENT_SECURITY_POLICY_REPORT_ONLY: 'Content-Security-Policy-Report-Only',
X_CONTENT_SECURITY_POLICY: 'X-Content-Security-Policy',
X_CONTENT_SECURITY_POLICY_REPORT_ONLY: 'X-Content-Security-Policy-Report-Only',
X_WEBKIT_CSP: 'X-WebKit-CSP',
X_WEBKIT_CSP_REPORT_ONLY: 'X-WebKit-CSP-Report-Only',
ETAG: 'ETag',
EXPIRES: 'Expires',
LAST_MODIFIED: 'Last-Modified',
LINK: 'Link',
LOCATION: 'Location',
P3P: 'P3P',
PROXY_AUTHENTICATE: 'Proxy-Authenticate',
REFRESH: 'Refresh',
RETRY_AFTER: 'Retry-After',
SERVER: 'Server',
SERVICE_WORKER_ALLOWED: 'Service-Worker-Allowed',
SET_COOKIE: 'Set-Cookie',
SET_COOKIE2: 'Set-Cookie2',
STRICT_TRANSPORT_SECURITY: 'Strict-Transport-Security',
TIMING_ALLOW_ORIGIN: 'Timing-Allow-Origin',
TRAILER: 'Trailer',
TRANSFER_ENCODING: 'Transfer-Encoding',
VARY: 'Vary',
WWW_AUTHENTICATE: 'WWW-Authenticate',
DNT: 'DNT',
X_CONTENT_TYPE_OPTIONS: 'X-Content-Type-Options',
X_DO_NOT_TRACK: 'X-Do-Not-Track',
X_FORWARDED_FOR: 'X-Forwarded-For',
X_FORWARDED_PROTO: 'X-Forwarded-Proto',
X_FORWARDED_HOST: 'X-Forwarded-Host',
X_FORWARDED_PORT: 'X-Forwarded-Port',
X_FRAME_OPTIONS: 'X-Frame-Options',
X_POWERED_BY: 'X-Powered-By',
PUBLIC_KEY_PINS: 'Public-Key-Pins',
PUBLIC_KEY_PINS_REPORT_ONLY: 'Public-Key-Pins-Report-Only',
X_REQUESTED_WITH: 'X-Requested-With',
X_USER_IP: 'X-User-IP',
X_XSS_PROTECTION: 'X-XSS-Protection',
PING_FROM: 'Ping-From',
PING_TO: 'Ping-To'
};
exports.HttpHeader = HttpHeader;
;