ngx-restful-client
Version:
The ultimate Angular library to exquisitely declare and implement the REST APIs you'll use in your application.
174 lines (173 loc) • 9.04 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentType = {
JSON: 'application/json',
XML: 'application/xml',
YAML: 'text/yaml',
EDN: 'application/edn',
OCTET_STREAM: 'application/octet-stream',
MULTIPART_FORM: 'multipart/form-data',
FORM_URL_ENCODED: 'application/x-www-form-urlencoded',
TEXT_PLAIN: 'text/plain',
};
/**
* ref.: https://www.iana.org/assignments/media-types/media-types.xhtml
*/
exports.MimeTypes = {
AAC: { extension: '.aac', description: 'AAC audio', type: 'audio/aac' },
ABW: { extension: '.abw', description: 'AbiWord document', type: 'application/x-abiword' },
ARC: {
extension: '.arc',
description: 'Archive document (multiple files embedded)',
type: 'application/x-freearc',
},
AVIF: { extension: '.avif', description: 'AVIF image', type: 'image/avif' },
AVI: { extension: '.avi', description: 'AVI: Audio Video Interleave', type: 'video/x-msvideo' },
AZW: {
extension: '.azw',
description: 'Amazon Kindle eBook format',
type: 'application/vnd.amazon.ebook',
},
BIN: { extension: '.bin', description: 'Any kind of binary data', type: 'application/octet-stream' },
BMP: { extension: '.bmp', description: 'Windows OS/2 Bitmap Graphics', type: 'image/bmp' },
BZ: { extension: '.bz', description: 'BZip archive', type: 'application/x-bzip' },
BZ2: { extension: '.bz2', description: 'BZip2 archive', type: 'application/x-bzip2' },
CDA: { extension: '.cda', description: 'CD audio', type: 'application/x-cdf' },
CSH: { extension: '.csh', description: 'C-Shell script', type: 'application/x-csh' },
CSS: { extension: '.css', description: 'Cascading Style Sheets (CSS)', type: 'text/css' },
CSV: { extension: '.csv', description: 'Comma-separated values (CSV)', type: 'text/csv' },
DOC: { extension: '.doc', description: 'Microsoft Word', type: 'application/msword' },
DOCX: {
extension: '.docx',
description: 'Microsoft Word (OpenXML)',
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
},
EOT: {
extension: '.eot',
description: 'MS Embedded OpenType fonts',
type: 'application/vnd.ms-fontobject',
},
EPUB: {
extension: '.epub',
description: 'Electronic publication (EPUB)',
type: 'application/epub+zip',
},
GZ: { extension: '.gz', description: 'GZip Compressed Archive', type: 'application/gzip' },
GIF: { extension: '.gif', description: 'Graphics Interchange Format (GIF)', type: 'image/gif' },
HTML: { extension: '.html', description: 'HyperText Markup Language (HTML)', type: 'text/html' },
HTM: { extension: '.htm', description: 'HyperText Markup Language (HTML)', type: 'text/html' },
ICO: { extension: '.ico', description: 'Icon format', type: 'image/vnd.microsoft.icon' },
ICS: { extension: '.ics', description: 'iCalendar format', type: 'text/calendar' },
JAR: { extension: '.jar', description: 'Java Archive (JAR)', type: 'application/java-archive' },
JPG: { extension: '.jpg', description: 'JPEG images', type: 'image/jpeg' },
JPEG: { extension: '.jpeg', description: 'JPEG images', type: 'image/jpeg' },
JS: {
extension: '.js',
description: 'JavaScript',
type: 'text/javascript (Specifications: HTML and RFC 9239)',
},
JSON: { extension: '.json', description: 'JSON format', type: 'application/json' },
JSONLD: { extension: '.jsonld', description: 'JSON-LD format', type: 'application/ld+json' },
MIDI: {
extension: '.midi',
description: 'Musical Instrument Digital Interface (MIDI)',
type: 'audio/midi audio/x-midi',
},
MID: {
extension: '.mid',
description: 'Musical Instrument Digital Interface (MIDI)',
type: 'audio/midi audio/x-midi',
},
MJS: { extension: '.mjs', description: 'JavaScript module', type: 'text/javascript' },
MP3: { extension: '.mp3', description: 'MP3 audio', type: 'audio/mpeg' },
MP4: { extension: '.mp4', description: 'MP4 video', type: 'video/mp4' },
MPEG: { extension: '.mpeg', description: 'MPEG Video', type: 'video/mpeg' },
MPKG: {
extension: '.mpkg',
description: 'Apple Installer Package',
type: 'application/vnd.apple.installer+xml',
},
ODP: {
extension: '.odp',
description: 'OpenDocument presentation document',
type: 'application/vnd.oasis.opendocument.presentation',
},
ODS: {
extension: '.ods',
description: 'OpenDocument spreadsheet document',
type: 'application/vnd.oasis.opendocument.spreadsheet',
},
ODT: {
extension: '.odt',
description: 'OpenDocument text document',
type: 'application/vnd.oasis.opendocument.text',
},
OGA: { extension: '.oga', description: 'OGG audio', type: 'audio/ogg' },
OGV: { extension: '.ogv', description: 'OGG video', type: 'video/ogg' },
OGX: { extension: '.ogx', description: 'OGG', type: 'application/ogg' },
OPUS: { extension: '.opus', description: 'Opus audio', type: 'audio/opus' },
OTF: { extension: '.otf', description: 'OpenType font', type: 'font/otf' },
PNG: { extension: '.png', description: 'Portable Network Graphics', type: 'image/png' },
PDF: {
extension: '.pdf',
description: 'Adobe Portable Document Format (PDF)',
type: 'application/pdf',
},
PHP: {
extension: '.php',
description: 'Hypertext Preprocessor (Personal Home Page)',
type: 'application/x-httpd-php',
},
PPT: { extension: '.ppt', description: 'Microsoft PowerPoint', type: 'application/vnd.ms-powerpoint' },
PPTX: {
extension: '.pptx',
description: 'Microsoft PowerPoint (OpenXML)',
type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
},
RAR: { extension: '.rar', description: 'RAR archive', type: 'application/vnd.rar' },
RTF: { extension: '.rtf', description: 'Rich Text Format (RTF)', type: 'application/rtf' },
SH: { extension: '.sh', description: 'Bourne shell script', type: 'application/x-sh' },
SVG: { extension: '.svg', description: 'Scalable Vector Graphics (SVG)', type: 'image/svg+xml' },
SWF: {
extension: '.swf',
description: 'Small web format (SWF) or Adobe Flash document',
type: 'application/x-shockwave-flash',
},
TAR: { extension: '.tar', description: 'Tape Archive (TAR)', type: 'application/x-tar' },
TIF: { extension: '.tif', description: 'Tagged Image File Format (TIFF)', type: 'image/tiff' },
TIFF: { extension: '.tiff', description: 'Tagged Image File Format (TIFF)', type: 'image/tiff' },
TS: { extension: '.ts', description: 'MPEG transport stream', type: 'video/mp2t' },
TTF: { extension: '.ttf', description: 'TrueType Font', type: 'font/ttf' },
TXT: { extension: '.txt', description: 'Text, (generally ASCII or ISO 8859-n)', type: 'text/plain' },
VSD: { extension: '.vsd', description: 'Microsoft Visio', type: 'application/vnd.visio' },
WAV: { extension: '.wav', description: 'Waveform Audio Format', type: 'audio/wav' },
WEBA: { extension: '.weba', description: 'WEBM audio', type: 'audio/webm' },
WEBM: { extension: '.webm', description: 'WEBM video', type: 'video/webm' },
WEBP: { extension: '.webp', description: 'WEBP image', type: 'image/webp' },
WOFF: { extension: '.woff', description: 'Web Open Font Format (WOFF)', type: 'font/woff' },
WOFF2: { extension: '.woff2', description: 'Web Open Font Format (WOFF)', type: 'font/woff2' },
XHTML: { extension: '.xhtml', description: 'XHTML', type: 'application/xhtml+xml' },
XLS: { extension: '.xls', description: 'Microsoft Excel', type: 'application/vnd.ms-excel' },
XLSX: {
extension: '.xlsx',
description: 'Microsoft Excel (OpenXML)',
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
},
XML: { extension: '.xml', description: 'XML', type: 'application/xml' },
TEXT_XML: { extension: '.xml', description: 'XML', type: 'text/xml' },
XUL: { extension: '.xul', description: 'XUL', type: 'application/vnd.mozilla.xul+xml' },
ZIP: { extension: '.zip', description: 'ZIP archive', type: 'application/zip' },
_3GP_VIDEO: { extension: '.3gp', description: '3GPP audio/video container', type: 'video/3gpp' },
_3GP_AUDIO: {
extension: '.3gp',
description: "3GPP audio/video container, if it doesn't contain video",
type: 'audio/3gpp',
},
_3G2_VIDEO: { extension: '.3g2', description: '3GPP2 audio/video container', type: 'video/3gpp2' },
_3G2_AUDIO: {
extension: '.3g2',
description: "3GPP2 audio/video container, if it doesn't contain video",
type: 'audio/3gpp2',
},
_7Z: { extension: '.7z', description: '7-zip archive', type: 'application/x-7z-compressed' },
};