/** * Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * @file src/headers.ts * @author leeight */ /** 标准 HTTP 头部常量 */ /** 内容类型 */ export declare const CONTENT_TYPE: "Content-Type"; /** 内容长度 */ export declare const CONTENT_LENGTH: "Content-Length"; /** 内容 MD5 校验值 */ export declare const CONTENT_MD5: "Content-MD5"; /** 内容编码 */ export declare const CONTENT_ENCODING: "Content-Encoding"; /** 内容处置 */ export declare const CONTENT_DISPOSITION: "Content-Disposition"; /** 实体标签 */ export declare const ETAG: "ETag"; /** 连接类型 */ export declare const CONNECTION: "Connection"; /** 主机名 */ export declare const HOST: "Host"; /** 用户代理 */ export declare const USER_AGENT: "User-Agent"; /** 缓存控制 */ export declare const CACHE_CONTROL: "Cache-Control"; /** 过期时间 */ export declare const EXPIRES: "Expires"; /** 源域 */ export declare const ORIGIN: "Origin"; /** 跨域请求方法 */ export declare const ACCESS_CONTROL_REQUEST_METHOD: "Access-Control-Request-Method"; /** 跨域请求头部 */ export declare const ACCESS_CONTROL_REQUEST_HEADERS: "Access-Control-Request-Headers"; /** BCE 相关头部常量 */ /** 授权头部 */ export declare const AUTHORIZATION: "Authorization"; /** BCE 日期头部 */ export declare const X_BCE_DATE: "x-bce-date"; /** BCE 访问控制列表 */ export declare const X_BCE_ACL: "x-bce-acl"; /** BCE 授予读权限 */ export declare const X_BCE_GRANT_READ: "x-bce-grant-read"; /** BCE 授予完全控制权限 */ export declare const X_BCE_GRANT_FULL_CONTROL: "x-bce-grant-full-control"; /** BCE 请求 ID */ export declare const X_BCE_REQUEST_ID: "x-bce-request-id"; /** BCE 内容 SHA256 校验值 */ export declare const X_BCE_CONTENT_SHA256: "x-bce-content-sha256"; /** BCE 对象访问控制列表 */ export declare const X_BCE_OBJECT_ACL: "x-bce-object-acl"; /** BCE 对象授予读权限 */ export declare const X_BCE_OBJECT_GRANT_READ: "x-bce-object-grant-read"; /** BCE 存储类型 */ export declare const X_BCE_STORAGE_CLASS: "x-bce-storage-class"; /** BCE 服务端加密 */ export declare const X_BCE_SERVER_SIDE_ENCRYPTION: "x-bce-server-side-encryption"; /** BCE 恢复天数 */ export declare const X_BCE_RESTORE_DAYS: "x-bce-restore-days"; /** BCE 恢复层级 */ export declare const X_BCE_RESTORE_TIER: "x-bce-restore-tier"; /** BCE 符号链接目标 */ export declare const X_BCE_SYMLINK_TARGET: "x-bce-symlink-target"; /** BCE 禁止覆写 */ export declare const X_BCE_FORBID_OVERWRITE: "x-bce-forbid-overwrite"; /** BCE 流量限制 */ export declare const X_BCE_TRAFFIC_LIMIT: "x-bce-traffic-limit"; /** BCE 拉取源 */ export declare const X_BCE_FETCH_SOURCE: "x-bce-fetch-source"; /** BCE 拉取模式 */ export declare const X_BCE_FETCH_MODE: "x-bce-fetch-mode"; /** BCE 回调地址 */ export declare const X_BCE_CALLBACK_ADDRESS: "x-bce-callback-address"; /** BCE 拉取来源页 */ export declare const X_BCE_FETCH_REFERER: "x-bce-fetch-referer"; /** BCE 拉取用户代理 */ export declare const X_BCE_FETCH_USER_AGENT: "x-bce-fetch-user-agent"; /** BCE 处理参数 */ export declare const X_BCE_PROCESS: "x-bce-process"; /** BCE 源 */ export declare const X_BCE_SOURCE: "x-bce-source"; /** BCE 标签 */ export declare const X_BCE_TAGGING: "x-bce-tagging"; /** 响应相关头部常量 */ /** HTTP 头部 */ export declare const X_HTTP_HEADERS: "http_headers"; /** 响应体 */ export declare const X_BODY: "body"; /** HTTP 状态码 */ export declare const X_STATUS_CODE: "status_code"; /** 消息 */ export declare const X_MESSAGE: "message"; /** 错误代码 */ export declare const X_CODE: "code"; /** 请求 ID */ export declare const X_REQUEST_ID: "request_id"; /** 会话令牌 */ export declare const SESSION_TOKEN: "x-bce-security-token"; /** VOD 相关头部常量 */ /** VOD 媒体标题 */ export declare const X_VOD_MEDIA_TITLE: "x-vod-media-title"; /** VOD 媒体描述 */ export declare const X_VOD_MEDIA_DESCRIPTION: "x-vod-media-description"; /** 其他头部常量 */ /** 接受编码 */ export declare const ACCEPT_ENCODING: "accept-encoding"; /** 接受类型 */ export declare const ACCEPT: "accept"; /** 头部名称类型联合 */ export type HeaderName = typeof CONTENT_TYPE | typeof CONTENT_LENGTH | typeof CONTENT_MD5 | typeof CONTENT_ENCODING | typeof CONTENT_DISPOSITION | typeof ETAG | typeof CONNECTION | typeof HOST | typeof USER_AGENT | typeof CACHE_CONTROL | typeof EXPIRES | typeof ORIGIN | typeof ACCESS_CONTROL_REQUEST_METHOD | typeof ACCESS_CONTROL_REQUEST_HEADERS | typeof AUTHORIZATION | typeof X_BCE_DATE | typeof X_BCE_ACL | typeof X_BCE_GRANT_READ | typeof X_BCE_GRANT_FULL_CONTROL | typeof X_BCE_REQUEST_ID | typeof X_BCE_CONTENT_SHA256 | typeof X_BCE_OBJECT_ACL | typeof X_BCE_OBJECT_GRANT_READ | typeof X_BCE_STORAGE_CLASS | typeof X_BCE_SERVER_SIDE_ENCRYPTION | typeof X_BCE_RESTORE_DAYS | typeof X_BCE_RESTORE_TIER | typeof X_BCE_SYMLINK_TARGET | typeof X_BCE_FORBID_OVERWRITE | typeof X_BCE_TRAFFIC_LIMIT | typeof X_BCE_FETCH_SOURCE | typeof X_BCE_FETCH_MODE | typeof X_BCE_CALLBACK_ADDRESS | typeof X_BCE_FETCH_REFERER | typeof X_BCE_FETCH_USER_AGENT | typeof X_BCE_PROCESS | typeof X_BCE_SOURCE | typeof X_BCE_TAGGING | typeof SESSION_TOKEN | typeof X_VOD_MEDIA_TITLE | typeof X_VOD_MEDIA_DESCRIPTION | typeof ACCEPT_ENCODING | typeof ACCEPT | string; /** 标准 HTTP 头部集合 */ export declare const STANDARD_HEADERS: { readonly CONTENT_TYPE: "Content-Type"; readonly CONTENT_LENGTH: "Content-Length"; readonly CONTENT_MD5: "Content-MD5"; readonly CONTENT_ENCODING: "Content-Encoding"; readonly CONTENT_DISPOSITION: "Content-Disposition"; readonly ETAG: "ETag"; readonly CONNECTION: "Connection"; readonly HOST: "Host"; readonly USER_AGENT: "User-Agent"; readonly CACHE_CONTROL: "Cache-Control"; readonly EXPIRES: "Expires"; readonly ORIGIN: "Origin"; readonly ACCESS_CONTROL_REQUEST_METHOD: "Access-Control-Request-Method"; readonly ACCESS_CONTROL_REQUEST_HEADERS: "Access-Control-Request-Headers"; readonly ACCEPT_ENCODING: "accept-encoding"; readonly ACCEPT: "accept"; }; /** BCE 特定头部集合 */ export declare const BCE_HEADERS: { readonly AUTHORIZATION: "Authorization"; readonly X_BCE_DATE: "x-bce-date"; readonly X_BCE_ACL: "x-bce-acl"; readonly X_BCE_GRANT_READ: "x-bce-grant-read"; readonly X_BCE_GRANT_FULL_CONTROL: "x-bce-grant-full-control"; readonly X_BCE_REQUEST_ID: "x-bce-request-id"; readonly X_BCE_CONTENT_SHA256: "x-bce-content-sha256"; readonly X_BCE_OBJECT_ACL: "x-bce-object-acl"; readonly X_BCE_OBJECT_GRANT_READ: "x-bce-object-grant-read"; readonly X_BCE_STORAGE_CLASS: "x-bce-storage-class"; readonly X_BCE_SERVER_SIDE_ENCRYPTION: "x-bce-server-side-encryption"; readonly X_BCE_RESTORE_DAYS: "x-bce-restore-days"; readonly X_BCE_RESTORE_TIER: "x-bce-restore-tier"; readonly X_BCE_SYMLINK_TARGET: "x-bce-symlink-target"; readonly X_BCE_FORBID_OVERWRITE: "x-bce-forbid-overwrite"; readonly X_BCE_TRAFFIC_LIMIT: "x-bce-traffic-limit"; readonly X_BCE_FETCH_SOURCE: "x-bce-fetch-source"; readonly X_BCE_FETCH_MODE: "x-bce-fetch-mode"; readonly X_BCE_CALLBACK_ADDRESS: "x-bce-callback-address"; readonly X_BCE_FETCH_REFERER: "x-bce-fetch-referer"; readonly X_BCE_FETCH_USER_AGENT: "x-bce-fetch-user-agent"; readonly X_BCE_PROCESS: "x-bce-process"; readonly X_BCE_SOURCE: "x-bce-source"; readonly X_BCE_TAGGING: "x-bce-tagging"; readonly SESSION_TOKEN: "x-bce-security-token"; }; /** VOD 特定头部集合 */ export declare const VOD_HEADERS: { readonly X_VOD_MEDIA_TITLE: "x-vod-media-title"; readonly X_VOD_MEDIA_DESCRIPTION: "x-vod-media-description"; }; /** 响应相关头部集合 */ export declare const RESPONSE_HEADERS: { readonly X_HTTP_HEADERS: "http_headers"; readonly X_BODY: "body"; readonly X_STATUS_CODE: "status_code"; readonly X_MESSAGE: "message"; readonly X_CODE: "code"; readonly X_REQUEST_ID: "request_id"; }; /** 所有头部常量集合 */ export declare const ALL_HEADERS: { readonly X_HTTP_HEADERS: "http_headers"; readonly X_BODY: "body"; readonly X_STATUS_CODE: "status_code"; readonly X_MESSAGE: "message"; readonly X_CODE: "code"; readonly X_REQUEST_ID: "request_id"; readonly X_VOD_MEDIA_TITLE: "x-vod-media-title"; readonly X_VOD_MEDIA_DESCRIPTION: "x-vod-media-description"; readonly AUTHORIZATION: "Authorization"; readonly X_BCE_DATE: "x-bce-date"; readonly X_BCE_ACL: "x-bce-acl"; readonly X_BCE_GRANT_READ: "x-bce-grant-read"; readonly X_BCE_GRANT_FULL_CONTROL: "x-bce-grant-full-control"; readonly X_BCE_REQUEST_ID: "x-bce-request-id"; readonly X_BCE_CONTENT_SHA256: "x-bce-content-sha256"; readonly X_BCE_OBJECT_ACL: "x-bce-object-acl"; readonly X_BCE_OBJECT_GRANT_READ: "x-bce-object-grant-read"; readonly X_BCE_STORAGE_CLASS: "x-bce-storage-class"; readonly X_BCE_SERVER_SIDE_ENCRYPTION: "x-bce-server-side-encryption"; readonly X_BCE_RESTORE_DAYS: "x-bce-restore-days"; readonly X_BCE_RESTORE_TIER: "x-bce-restore-tier"; readonly X_BCE_SYMLINK_TARGET: "x-bce-symlink-target"; readonly X_BCE_FORBID_OVERWRITE: "x-bce-forbid-overwrite"; readonly X_BCE_TRAFFIC_LIMIT: "x-bce-traffic-limit"; readonly X_BCE_FETCH_SOURCE: "x-bce-fetch-source"; readonly X_BCE_FETCH_MODE: "x-bce-fetch-mode"; readonly X_BCE_CALLBACK_ADDRESS: "x-bce-callback-address"; readonly X_BCE_FETCH_REFERER: "x-bce-fetch-referer"; readonly X_BCE_FETCH_USER_AGENT: "x-bce-fetch-user-agent"; readonly X_BCE_PROCESS: "x-bce-process"; readonly X_BCE_SOURCE: "x-bce-source"; readonly X_BCE_TAGGING: "x-bce-tagging"; readonly SESSION_TOKEN: "x-bce-security-token"; readonly CONTENT_TYPE: "Content-Type"; readonly CONTENT_LENGTH: "Content-Length"; readonly CONTENT_MD5: "Content-MD5"; readonly CONTENT_ENCODING: "Content-Encoding"; readonly CONTENT_DISPOSITION: "Content-Disposition"; readonly ETAG: "ETag"; readonly CONNECTION: "Connection"; readonly HOST: "Host"; readonly USER_AGENT: "User-Agent"; readonly CACHE_CONTROL: "Cache-Control"; readonly EXPIRES: "Expires"; readonly ORIGIN: "Origin"; readonly ACCESS_CONTROL_REQUEST_METHOD: "Access-Control-Request-Method"; readonly ACCESS_CONTROL_REQUEST_HEADERS: "Access-Control-Request-Headers"; readonly ACCEPT_ENCODING: "accept-encoding"; readonly ACCEPT: "accept"; }; export default ALL_HEADERS; //# sourceMappingURL=headers.d.ts.map