Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@corefunc/http

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corefunc/http - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

3

dist/http.d.ts

@@ -662,2 +662,3 @@ //#region 1XX

TEXT_CALENDAR: string;
TEXT_COMMA_SEPARATED_VALUES: string;
TEXT_CSS: string;

@@ -688,3 +689,3 @@ TEXT_CSV: string;

* @readonly
* @type {{APP_DART: string, TEXT_HTML: string, APP: string, AUDIO_VORBIS: string, APP_XHTML: string, TEXT_XML: string, AUDIO_BASIC: string, AUDIO_OGG: string, AUDIO_WEBM: string, VIDEO: string, APP_MICROSOFT_EXCEL: string, APP_RDF_XML: string, IMAGE_APNG: string, APP_RTF: string, TEXT: string, APP_EPUB: string, AUDIO_MP4: string, AUDIO: string, VIDEO_THREE_GPP2: string, IMAGE_WEBP: string, APP_WOFF: string, TEXT_CALENDAR: string, VIDEO_QUICKTIME: string, APP_PROTOBUF: string, IMAGE: string, VIDEO_MP4: string, IMAGE_SVG: string, VIDEO_OGG: string, TEXT_CACHE_MANIFEST: string, IMAGE_CRW: string, APP_PDF: string, APP_SKETCHUP: string, TEXT_JAVASCRIPT: string, APP_EOT: string, APP_MICROSOFT_WORD: string, TEXT_VCARD: string, IMAGE_ICO: string, TEXT_VTT: string, APP_GZIP: string, APP_LD_JSON: string, AUDIO_WAX: string, VIDEO_AV1: string, AUDIO_VND_REAL: string, IMAGE_BMP: string, APP_ATOM: string, IMAGE_AVIF: string, TEXT_CSV: string, APP_FORM_DATA: string, APP_XML: string, TEXT_CSS: string, APP_JAVASCRIPT: string, APP_SOAP_XML: string, APP_MICROSOFT_POWERPOINT: string, APP_MBOX: string, APP_MOBILE_CONFIG: string, APP_OGG: string, TEXT_PLAIN: string, APP_MANIFEST_JSON: string, APP_XRD: string, AUDIO_WMA: string, TEXT_TSV: string, VIDEO_WEBM: string, VIDEO_WMV: string, TEXT_WML: string, IMAGE_JPEG: string, IMAGE_PSD: string, AUDIO_VND_WAVE: string, APP_TAR: string, ANY: string, APP_BZIP2: string, APP_ZIP: string, IMAGE_PNG: string, APP_POSTSCRIPT: string, VIDEO_MPEG: string, APP_SFNT: string, IMAGE_TIFF: string, VIDEO_THREE_GPP: string, APP_KEY_ARCHIVE: string, APP_NACL: string, APP_BINARY: string, APP_KML: string, APP_NACL_PORTABLE: string, APP_WOFF2: string, APP_JSON: string, AUDIO_L24: string, APP_PASSBOOK: string, APP_SHOCKWAVE_FLASH: string, IMAGE_AVIF_SEQ: string, AUDIO_MPEG: string, VIDEO_FLV: string, IMAGE_GIF: string, IMAGE_HEIC: string, APP_OCTET_STREAM: string, APP_KMZ: string, IMAGE_HEIF: string, AUDIO_AAC: string}}
* @type {{APP_DART: string, TEXT_HTML: string, APP: string, AUDIO_VORBIS: string, APP_XHTML: string, TEXT_XML: string, AUDIO_BASIC: string, AUDIO_OGG: string, AUDIO_WEBM: string, VIDEO: string, APP_MICROSOFT_EXCEL: string, APP_RDF_XML: string, IMAGE_APNG: string, APP_RTF: string, TEXT: string, APP_EPUB: string, AUDIO_MP4: string, AUDIO: string, VIDEO_THREE_GPP2: string, IMAGE_WEBP: string, APP_WOFF: string, TEXT_CALENDAR: string, VIDEO_QUICKTIME: string, APP_PROTOBUF: string, IMAGE: string, VIDEO_MP4: string, IMAGE_SVG: string, VIDEO_OGG: string, TEXT_CACHE_MANIFEST: string, IMAGE_CRW: string, APP_PDF: string, APP_SKETCHUP: string, TEXT_JAVASCRIPT: string, APP_EOT: string, APP_MICROSOFT_WORD: string, TEXT_VCARD: string, IMAGE_ICO: string, TEXT_VTT: string, APP_GZIP: string, APP_LD_JSON: string, AUDIO_WAX: string, VIDEO_AV1: string, AUDIO_VND_REAL: string, IMAGE_BMP: string, APP_ATOM: string, IMAGE_AVIF: string, TEXT_COMMA_SEPARATED_VALUES: string, TEXT_CSV: string, APP_FORM_DATA: string, APP_XML: string, TEXT_CSS: string, APP_JAVASCRIPT: string, APP_SOAP_XML: string, APP_MICROSOFT_POWERPOINT: string, APP_MBOX: string, APP_MOBILE_CONFIG: string, APP_OGG: string, TEXT_PLAIN: string, APP_MANIFEST_JSON: string, APP_XRD: string, AUDIO_WMA: string, TEXT_TSV: string, VIDEO_WEBM: string, VIDEO_WMV: string, TEXT_WML: string, IMAGE_JPEG: string, IMAGE_PSD: string, AUDIO_VND_WAVE: string, APP_TAR: string, ANY: string, APP_BZIP2: string, APP_ZIP: string, IMAGE_PNG: string, APP_POSTSCRIPT: string, VIDEO_MPEG: string, APP_SFNT: string, IMAGE_TIFF: string, VIDEO_THREE_GPP: string, APP_KEY_ARCHIVE: string, APP_NACL: string, APP_BINARY: string, APP_KML: string, APP_NACL_PORTABLE: string, APP_WOFF2: string, APP_JSON: string, AUDIO_L24: string, APP_PASSBOOK: string, APP_SHOCKWAVE_FLASH: string, IMAGE_AVIF_SEQ: string, AUDIO_MPEG: string, VIDEO_FLV: string, IMAGE_GIF: string, IMAGE_HEIC: string, APP_OCTET_STREAM: string, APP_KMZ: string, IMAGE_HEIF: string, AUDIO_AAC: string}}
*/

@@ -691,0 +692,0 @@ export declare const HTTP_METHOD: {

@@ -1,2 +0,2 @@

!function(E,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((E=E||self).CoreFuncHttp={})}(this,(function(E){"use strict";const e={ACCEPT:"Accept",ACCEPT_CHARSET:"Accept-Charset",ACCEPT_ENCODING:"Accept-Encoding",ACCEPT_LANGUAGE:"Accept-Language",ACCEPT_RANGES:"Accept-Ranges",ACCESS_CONTROL_ALLOW_CREDENTIALS:"Access-Control-Allow-Credentials",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_EXPOSE_HEADERS:"Access-Control-Expose-Headers",ACCESS_CONTROL_MAX_AGE:"Access-Control-Max-Age",ACCESS_CONTROL_REQUEST_HEADERS:"Access-Control-Request-Headers",ACCESS_CONTROL_REQUEST_METHOD:"Access-Control-Request-Method",AGE:"Age",ALLOW:"Allow",AUTHORIZATION:"Authorization",CACHE_CONTROL:"Cache-Control",CONNECTION:"Connection",CONTENT_DISPOSITION:"Content-Disposition",CONTENT_ENCODING:"Content-Encoding",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",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",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"Date",DNT:"DNT",ETAG:"ETag",EXPECT:"Expect",EXPIRES:"Expires",FOLLOW_ONLY_WHEN_PRERENDER_SHOWN:"Follow-Only-When-Prerender-Shown",FORWARDED:"Forwarded",FROM:"From",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",LAST_MODIFIED:"Last-Modified",LINK:"Link",LOCATION:"Location",MAX_FORWARDS:"Max-Forwards",ORIGIN:"Origin",P3P:"P3P",PING_FROM:"Ping-From",PING_TO:"Ping-To",PRAGMA:"Pragma",PROXY_AUTHENTICATE:"Proxy-Authenticate",PROXY_AUTHORIZATION:"Proxy-Authorization",PUBLIC_KEY_PINS:"Public-Key-Pins",PUBLIC_KEY_PINS_REPORT_ONLY:"Public-Key-Pins-Report-Only",RANGE:"Range",REFERER:"Referer",REFRESH:"Refresh",RETRY_AFTER:"Retry-After",SERVER:"Server",SERVICE_WORKER:"Service-Worker",SERVICE_WORKER_ALLOWED:"Service-Worker-Allowed",SET_COOKIE2:"Set-Cookie2",SET_COOKIE:"Set-Cookie",STRICT_TRANSPORT_SECURITY:"Strict-Transport-Security",TE:"TE",TIMING_ALLOW_ORIGIN:"Timing-Allow-Origin",TRAILER:"Trailer",TRANSFER_ENCODING:"Transfer-Encoding",UPGRADE:"Upgrade",USER_AGENT:"User-Agent",VARY:"Vary",VIA:"Via",WARNING:"Warning",WWW_AUTHENTICATE:"WWW-Authenticate",X_CONTENT_SECURITY_POLICY:"X-Content-Security-Policy",X_CONTENT_SECURITY_POLICY_REPORT_ONLY:"X-Content-Security-Policy-Report-Only",X_CONTENT_TYPE_OPTIONS:"X-Content-Type-Options",X_DO_NOT_TRACK:"X-Do-Not-Track",X_FORWARDED_FOR:"X-Forwarded-For",X_FORWARDED_HOST:"X-Forwarded-Host",X_FORWARDED_PORT:"X-Forwarded-Port",X_FORWARDED_PROTO:"X-Forwarded-Proto",X_FRAME_OPTIONS:"X-Frame-Options",X_POWERED_BY:"X-Powered-By",X_REQUESTED_WITH:"X-Requested-With",X_USER_IP:"X-User-IP",X_WEBKIT_CSP:"X-WebKit-CSP",X_WEBKIT_CSP_REPORT_ONLY:"X-WebKit-CSP-Report-Only",X_XSS_PROTECTION:"X-XSS-Protection"};function constant(E,e){return`${E}/${e}`}function text(E){return constant("text",E)}function image(E){return constant("image",E)}function audio(E){return constant("audio",E)}function video(E){return constant("video",E)}function application(E){return constant("application",E)}Object.freeze(e),Object.seal(e);const t={ANY:constant("*","*"),APP:application("*"),APP_ATOM:application("atom+xml"),APP_BINARY:application("binary"),APP_BZIP2:application("x-bzip2"),APP_DART:application("dart"),APP_EOT:application("vnd.ms-fontobject"),APP_EPUB:application("epub+zip"),APP_FORM_DATA:application("x-www-form-urlencoded"),APP_GZIP:application("x-gzip"),APP_JAVASCRIPT:application("javascript"),APP_JSON:application("json"),APP_KEY_ARCHIVE:application("pkcs12"),APP_KML:application("vnd.google-earth.kml+xml"),APP_KMZ:application("vnd.google-earth.kmz"),APP_LD_JSON:application("ld+json"),APP_MANIFEST_JSON:application("manifest+json"),APP_MBOX:application("mbox"),APP_MICROSOFT_EXCEL:application("vnd.ms-excel"),APP_MICROSOFT_POWERPOINT:application("vnd.ms-powerpoint"),APP_MICROSOFT_WORD:application("msword"),APP_MOBILE_CONFIG:application("x-apple-aspen-config"),APP_NACL:application("x-nacl"),APP_NACL_PORTABLE:application("x-pnacl"),APP_OCTET_STREAM:application("octet-stream"),APP_OGG:application("ogg"),APP_PASSBOOK:application("vnd.apple.pkpass"),APP_PDF:application("pdf"),APP_POSTSCRIPT:application("postscript"),APP_PROTOBUF:application("protobuf"),APP_RDF_XML:application("rdf+xml"),APP_RTF:application("rtf"),APP_SFNT:application("font-sfnt"),APP_SHOCKWAVE_FLASH:application("x-shockwave-flash"),APP_SKETCHUP:application("vnd.sketchup.skp"),APP_SOAP_XML:application("soap+xml"),APP_TAR:application("x-tar"),APP_WOFF2:application("font-woff2"),APP_WOFF:application("font-woff"),APP_XHTML:application("xhtml+xml"),APP_XML:application("xml"),APP_XRD:application("xrd+xml"),APP_ZIP:application("zip"),AUDIO:audio("*"),AUDIO_AAC:audio("aac"),AUDIO_BASIC:audio("basic"),AUDIO_L24:audio("l24"),AUDIO_MP4:audio("mp4"),AUDIO_MPEG:audio("mpeg"),AUDIO_OGG:audio("ogg"),AUDIO_VND_REAL:audio("vnd.rn-realaudio"),AUDIO_VND_WAVE:audio("vnd.wave"),AUDIO_VORBIS:audio("vorbis"),AUDIO_WAX:audio("x-ms-wax"),AUDIO_WEBM:audio("webm"),AUDIO_WMA:audio("x-ms-wma"),IMAGE:image("*"),IMAGE_APNG:image("apng"),IMAGE_AVIF:image("avif"),IMAGE_AVIF_SEQ:image("avif-sequence"),IMAGE_BMP:image("bmp"),IMAGE_CRW:image("x-canon-crw"),IMAGE_GIF:image("gif"),IMAGE_HEIC:image("heic"),IMAGE_HEIF:image("heif"),IMAGE_ICO:image("vnd.microsoft.icon"),IMAGE_JPEG:image("jpeg"),IMAGE_PNG:image("png"),IMAGE_PSD:image("vnd.adobe.photoshop"),IMAGE_SVG:image("svg+xml"),IMAGE_TIFF:image("tiff"),IMAGE_WEBP:image("webp"),TEXT:text("*"),TEXT_CACHE_MANIFEST:text("cache-manifest"),TEXT_CALENDAR:text("calendar"),TEXT_CSS:text("css"),TEXT_CSV:text("csv"),TEXT_HTML:text("html"),TEXT_JAVASCRIPT:text("javascript"),TEXT_PLAIN:text("plain"),TEXT_TSV:text("tab-separated-values"),TEXT_VCARD:text("vcard"),TEXT_VTT:text("vtt"),TEXT_WML:text("vnd.wap.wml"),TEXT_XML:text("xml"),VIDEO:video("*"),VIDEO_AV1:video("av1"),VIDEO_FLV:video("x-flv"),VIDEO_MP4:video("mp4"),VIDEO_MPEG:video("mpeg"),VIDEO_OGG:video("ogg"),VIDEO_QUICKTIME:video("quicktime"),VIDEO_THREE_GPP2:video("3gpp2"),VIDEO_THREE_GPP:video("3gpp"),VIDEO_WEBM:video("webm"),VIDEO_WMV:video("x-ms-wmv")};Object.freeze(t),Object.seal(t);const T={CONNECT:"CONNECT",DELETE:"DELETE",GET:"GET",HEAD:"HEAD",OPTIONS:"OPTIONS",PATCH:"PATCH",POST:"POST",PUT:"PUT",TRACE:"TRACE"};Object.freeze(T),Object.seal(T);const _={CONTINUE:"Continue",SWITCHING_PROTOCOLS:"Switching Protocols",PROCESSING:"Processing",EARLY_HINTS:"Early Hints",OK:"OK",CREATED:"Created",ACCEPTED:"Accepted",NON_AUTHORITATIVE_INFORMATION:"Non-Authoritative Information",NO_CONTENT:"No Content",RESET_CONTENT:"Reset Content",PARTIAL_CONTENT:"Partial Content",MULTI_STATUS:"Multi-Status",ALREADY_REPORTED:"Already Reported",IM_USED:"IM Used",MULTIPLE_CHOICES:"Multiple Choices",MOVED_PERMANENTLY:"Moved Permanently",MOVED_TEMPORARILY:"Found",SEE_OTHER:"See Other",NOT_MODIFIED:"Not Modified",USE_PROXY:"Use Proxy",UNUSED:"Unused",TEMPORARY_REDIRECT:"Temporary Redirect",PERMANENT_REDIRECT:"Permanent Redirect",BAD_REQUEST:"Bad Request",UNAUTHORIZED:"Unauthorized",PAYMENT_REQUIRED:"Payment Required",FORBIDDEN:"Forbidden",NOT_FOUND:"Not Found",METHOD_NOT_ALLOWED:"Method Not Allowed",NOT_ACCEPTABLE:"Not Acceptable",PROXY_AUTHENTICATION_REQUIRED:"Proxy Authentication Required",REQUEST_TIMEOUT:"Request Timeout",CONFLICT:"Conflict",GONE:"Gone",LENGTH_REQUIRED:"Length Required",PRECONDITION_FAILED:"Precondition Failed",PAYLOAD_TOO_LARGE:"Payload Too Large",REQUEST_URI_TOO_LONG:"URI Too Long",UNSUPPORTED_MEDIA_TYPE:"Unsupported Media Type",REQUESTED_RANGE_NOT_SATISFIABLE:"Range Not Satisfiable",EXPECTATION_FAILED:"Expectation Failed",IM_A_TEAPOT:"I'm a Teapot",INSUFFICIENT_SPACE_ON_RESOURCE:"Insufficient space on resource",ENHANCE_YOUR_CALM:"Enhance your calm",MISDIRECTED_REQUEST:"Misdirected Request",UNPROCESSABLE_ENTITY:"Unprocessable Entity",LOCKED:"Locked",FAILED_DEPENDENCY:"Failed Dependency",TOO_EARLY:"Too Early",UPGRADE_REQUIRED:"Upgrade Required",PRECONDITION_REQUIRED:"Precondition Required",TOO_MANY_REQUESTS:"Too Many Requests",WOULD_BLOCK:"Would Block",REQUEST_HEADER_FIELDS_TOO_LARGE:"Request Header Fields Too Large",UNAVAILABLE_FOR_LEGAL_REASONS:"Unavailable For Legal Reasons",INTERNAL_SERVER_ERROR:"Internal Server Error",NOT_IMPLEMENTED:"Not Implemented",BAD_GATEWAY:"Bad Gateway",SERVICE_UNAVAILABLE:"Service Unavailable",GATEWAY_TIMEOUT:"Gateway Timeout",HTTP_VERSION_NOT_SUPPORTED:"HTTP Version Not Supported",VARIANT_ALSO_NEGOTIATES:"Variant Also Negotiates",INSUFFICIENT_STORAGE:"Insufficient Storage",LOOP_DETECTED:"Loop Detected",BANDWIDTH_LIMIT_EXCEEDED:"Bandwidth Limit Exceeded",NOT_EXTENDED:"Not Extended",NETWORK_AUTHENTICATION_REQUIRED:"Network Authentication Required"};Object.freeze(_),Object.seal(_);const o={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,IM_USED:226,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,MOVED_TEMPORARILY:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,UNUSED:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,REQUEST_URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,REQUESTED_RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,INSUFFICIENT_SPACE_ON_RESOURCE:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,WOULD_BLOCK:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};Object.freeze(o),Object.seal(o);const O={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Unused",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",419:"Insufficient space on resource",420:"Enhance your calm",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",430:"Would Block",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};Object.freeze(O),Object.seal(O);const A=[204,205,304];Object.freeze(A),Object.seal(A);const n=[300,301,302,303,305,307,308];Object.freeze(n),Object.seal(n);const R=[502,503,504];function httpStatusCode(E){return Number.parseInt(Array.isArray(E)?""+E[0]:""+E,10)}function httpStatusText(E){return Array.isArray(E)?O[""+E[0]]:O[""+E]}function httpResponse(E,e){const t=httpStatusCode(E);let T=httpStatusText(t);"string"==typeof e?T=e:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4&&(T=E[0].substr(4));const _=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return t>399&&("error"in _||(_.error=!0)),{message:T,statusCode:t,..._}}Object.freeze(R),Object.seal(R);class Header{constructor(E={}){this.headers={...E}}toObject(){return{...this}}valueOf(){return this.toJSON()}toJSON(){return JSON.stringify(this.toObject())}ContentLength(E){return this.headers[e.CONTENT_LENGTH]=""+E,this}ContentType(E=t.APP_JSON,T="",_=""){return this.headers[e.CONTENT_TYPE]=E,T.length&&(this.headers[e.CONTENT_TYPE]+="; charset="+T,_.length&&(this.headers[e.CONTENT_TYPE]+="; boundary="+_)),this}}E.ACCEPTED=202,E.ALREADY_REPORTED=208,E.BAD_GATEWAY=502,E.BAD_REQUEST=400,E.BANDWIDTH_LIMIT_EXCEEDED=509,E.CONFLICT=409,E.CONTINUE=100,E.CREATED=201,E.EARLY_HINTS=103,E.ENHANCE_YOUR_CALM=420,E.EXPECTATION_FAILED=417,E.FAILED_DEPENDENCY=424,E.FORBIDDEN=403,E.GATEWAY_TIMEOUT=504,E.GONE=410,E.HTTP_HEADER=e,E.HTTP_MEDIA_TYPE=t,E.HTTP_METHOD=T,E.HTTP_VERSION_NOT_SUPPORTED=505,E.Header=Header,E.Headers=function Headers(E={}){return new Header(E)},E.IM_A_TEAPOT=418,E.IM_USED=226,E.INSUFFICIENT_SPACE_ON_RESOURCE=419,E.INSUFFICIENT_STORAGE=507,E.INTERNAL_SERVER_ERROR=500,E.LENGTH_REQUIRED=411,E.LOCKED=423,E.LOOP_DETECTED=508,E.METHOD_NOT_ALLOWED=405,E.MISDIRECTED_REQUEST=421,E.MOVED_PERMANENTLY=301,E.MOVED_TEMPORARILY=302,E.MULTIPLE_CHOICES=300,E.MULTI_STATUS=207,E.NETWORK_AUTHENTICATION_REQUIRED=511,E.NON_AUTHORITATIVE_INFORMATION=203,E.NOT_ACCEPTABLE=406,E.NOT_EXTENDED=510,E.NOT_FOUND=404,E.NOT_IMPLEMENTED=501,E.NOT_MODIFIED=304,E.NO_CONTENT=204,E.OK=200,E.PARTIAL_CONTENT=206,E.PAYLOAD_TOO_LARGE=413,E.PAYMENT_REQUIRED=402,E.PERMANENT_REDIRECT=308,E.PRECONDITION_FAILED=412,E.PRECONDITION_REQUIRED=428,E.PROCESSING=102,E.PROXY_AUTHENTICATION_REQUIRED=407,E.REQUESTED_RANGE_NOT_SATISFIABLE=416,E.REQUEST_HEADER_FIELDS_TOO_LARGE=431,E.REQUEST_TIMEOUT=408,E.REQUEST_URI_TOO_LONG=414,E.RESET_CONTENT=205,E.SEE_OTHER=303,E.SERVICE_UNAVAILABLE=503,E.STATUS_CODE_EMPTY=A,E.STATUS_CODE_MEMO=_,E.STATUS_CODE_REDIRECT=n,E.STATUS_CODE_RETRY=R,E.STATUS_CODE_TAG=o,E.STATUS_CODE_TEXT=O,E.SWITCHING_PROTOCOLS=101,E.TEMPORARY_REDIRECT=307,E.TOO_EARLY=425,E.TOO_MANY_REQUESTS=429,E.UNAUTHORIZED=401,E.UNAVAILABLE_FOR_LEGAL_REASONS=451,E.UNPROCESSABLE_ENTITY=422,E.UNSUPPORTED_MEDIA_TYPE=415,E.UNUSED=306,E.UPGRADE_REQUIRED=426,E.USE_PROXY=305,E.VARIANT_ALSO_NEGOTIATES=506,E.WOULD_BLOCK=430,E.httpResponse=httpResponse,E.httpResponseHtml=function httpResponseHtml(E,e){const t=httpStatusCode(E);let T=`<!DOCTYPE html><html><body><h1>${t} ${httpStatusText(t)}</h1>`;return"string"==typeof e?T=`${T}<h2>${e}</h2>`:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4?T=`${T}<h2>${E[0].substr(4)}</h2>`:e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(E=>{T=`${T}<p><strong>${E}</strong><span>${e[E]}</span></p>`}),T+"</body></html>"},E.httpResponseJson=function httpResponseJson(E,e){return JSON.stringify(httpResponse(E,e))},E.httpResponseText=function httpResponseText(E,e){const t=httpStatusCode(E);let T=`${t} ${httpStatusText(t)}`;return"string"==typeof e?T=`${T}\n${e}`:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4?T=`${T}\n${E[0].substr(4)}`:e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(E=>{T=`${T}\n${E}\t${e[E]}`}),T},E.httpResponseXml=function httpResponseXml(E,e){let t='<?xml version="1.0" encoding="UTF-8"?><root>';const T=httpResponse(E,e);return Object.keys(T).forEach(E=>{t=`${t}<${E}>${T[E]}</${E}>`}),t+"</root>"},E.httpStatusCode=httpStatusCode,E.httpStatusText=httpStatusText,Object.defineProperty(E,"__esModule",{value:!0})}));
!function(E,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((E="undefined"!=typeof globalThis?globalThis:E||self).CoreFuncHttp={})}(this,(function(E){"use strict";const e={ACCEPT:"Accept",ACCEPT_CHARSET:"Accept-Charset",ACCEPT_ENCODING:"Accept-Encoding",ACCEPT_LANGUAGE:"Accept-Language",ACCEPT_RANGES:"Accept-Ranges",ACCESS_CONTROL_ALLOW_CREDENTIALS:"Access-Control-Allow-Credentials",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_EXPOSE_HEADERS:"Access-Control-Expose-Headers",ACCESS_CONTROL_MAX_AGE:"Access-Control-Max-Age",ACCESS_CONTROL_REQUEST_HEADERS:"Access-Control-Request-Headers",ACCESS_CONTROL_REQUEST_METHOD:"Access-Control-Request-Method",AGE:"Age",ALLOW:"Allow",AUTHORIZATION:"Authorization",CACHE_CONTROL:"Cache-Control",CONNECTION:"Connection",CONTENT_DISPOSITION:"Content-Disposition",CONTENT_ENCODING:"Content-Encoding",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",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",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"Date",DNT:"DNT",ETAG:"ETag",EXPECT:"Expect",EXPIRES:"Expires",FOLLOW_ONLY_WHEN_PRERENDER_SHOWN:"Follow-Only-When-Prerender-Shown",FORWARDED:"Forwarded",FROM:"From",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",LAST_MODIFIED:"Last-Modified",LINK:"Link",LOCATION:"Location",MAX_FORWARDS:"Max-Forwards",ORIGIN:"Origin",P3P:"P3P",PING_FROM:"Ping-From",PING_TO:"Ping-To",PRAGMA:"Pragma",PROXY_AUTHENTICATE:"Proxy-Authenticate",PROXY_AUTHORIZATION:"Proxy-Authorization",PUBLIC_KEY_PINS:"Public-Key-Pins",PUBLIC_KEY_PINS_REPORT_ONLY:"Public-Key-Pins-Report-Only",RANGE:"Range",REFERER:"Referer",REFRESH:"Refresh",RETRY_AFTER:"Retry-After",SERVER:"Server",SERVICE_WORKER:"Service-Worker",SERVICE_WORKER_ALLOWED:"Service-Worker-Allowed",SET_COOKIE2:"Set-Cookie2",SET_COOKIE:"Set-Cookie",STRICT_TRANSPORT_SECURITY:"Strict-Transport-Security",TE:"TE",TIMING_ALLOW_ORIGIN:"Timing-Allow-Origin",TRAILER:"Trailer",TRANSFER_ENCODING:"Transfer-Encoding",UPGRADE:"Upgrade",USER_AGENT:"User-Agent",VARY:"Vary",VIA:"Via",WARNING:"Warning",WWW_AUTHENTICATE:"WWW-Authenticate",X_CONTENT_SECURITY_POLICY:"X-Content-Security-Policy",X_CONTENT_SECURITY_POLICY_REPORT_ONLY:"X-Content-Security-Policy-Report-Only",X_CONTENT_TYPE_OPTIONS:"X-Content-Type-Options",X_DO_NOT_TRACK:"X-Do-Not-Track",X_FORWARDED_FOR:"X-Forwarded-For",X_FORWARDED_HOST:"X-Forwarded-Host",X_FORWARDED_PORT:"X-Forwarded-Port",X_FORWARDED_PROTO:"X-Forwarded-Proto",X_FRAME_OPTIONS:"X-Frame-Options",X_POWERED_BY:"X-Powered-By",X_REQUESTED_WITH:"X-Requested-With",X_USER_IP:"X-User-IP",X_WEBKIT_CSP:"X-WebKit-CSP",X_WEBKIT_CSP_REPORT_ONLY:"X-WebKit-CSP-Report-Only",X_XSS_PROTECTION:"X-XSS-Protection"};function constant(E,e){return`${E}/${e}`}function text(E){return constant("text",E)}function image(E){return constant("image",E)}function audio(E){return constant("audio",E)}function video(E){return constant("video",E)}function application(E){return constant("application",E)}Object.freeze(e),Object.seal(e);const t={ANY:constant("*","*"),APP:application("*"),APP_ATOM:application("atom+xml"),APP_BINARY:application("binary"),APP_BZIP2:application("x-bzip2"),APP_DART:application("dart"),APP_EOT:application("vnd.ms-fontobject"),APP_EPUB:application("epub+zip"),APP_FORM_DATA:application("x-www-form-urlencoded"),APP_GZIP:application("x-gzip"),APP_JAVASCRIPT:application("javascript"),APP_JSON:application("json"),APP_KEY_ARCHIVE:application("pkcs12"),APP_KML:application("vnd.google-earth.kml+xml"),APP_KMZ:application("vnd.google-earth.kmz"),APP_LD_JSON:application("ld+json"),APP_MANIFEST_JSON:application("manifest+json"),APP_MBOX:application("mbox"),APP_MICROSOFT_EXCEL:application("vnd.ms-excel"),APP_MICROSOFT_POWERPOINT:application("vnd.ms-powerpoint"),APP_MICROSOFT_WORD:application("msword"),APP_MOBILE_CONFIG:application("x-apple-aspen-config"),APP_NACL:application("x-nacl"),APP_NACL_PORTABLE:application("x-pnacl"),APP_OCTET_STREAM:application("octet-stream"),APP_OGG:application("ogg"),APP_PASSBOOK:application("vnd.apple.pkpass"),APP_PDF:application("pdf"),APP_POSTSCRIPT:application("postscript"),APP_PROTOBUF:application("protobuf"),APP_RDF_XML:application("rdf+xml"),APP_RTF:application("rtf"),APP_SFNT:application("font-sfnt"),APP_SHOCKWAVE_FLASH:application("x-shockwave-flash"),APP_SKETCHUP:application("vnd.sketchup.skp"),APP_SOAP_XML:application("soap+xml"),APP_TAR:application("x-tar"),APP_WOFF2:application("font-woff2"),APP_WOFF:application("font-woff"),APP_XHTML:application("xhtml+xml"),APP_XML:application("xml"),APP_XRD:application("xrd+xml"),APP_ZIP:application("zip"),AUDIO:audio("*"),AUDIO_AAC:audio("aac"),AUDIO_BASIC:audio("basic"),AUDIO_L24:audio("l24"),AUDIO_MP4:audio("mp4"),AUDIO_MPEG:audio("mpeg"),AUDIO_OGG:audio("ogg"),AUDIO_VND_REAL:audio("vnd.rn-realaudio"),AUDIO_VND_WAVE:audio("vnd.wave"),AUDIO_VORBIS:audio("vorbis"),AUDIO_WAX:audio("x-ms-wax"),AUDIO_WEBM:audio("webm"),AUDIO_WMA:audio("x-ms-wma"),IMAGE:image("*"),IMAGE_APNG:image("apng"),IMAGE_AVIF:image("avif"),IMAGE_AVIF_SEQ:image("avif-sequence"),IMAGE_BMP:image("bmp"),IMAGE_CRW:image("x-canon-crw"),IMAGE_GIF:image("gif"),IMAGE_HEIC:image("heic"),IMAGE_HEIF:image("heif"),IMAGE_ICO:image("vnd.microsoft.icon"),IMAGE_JPEG:image("jpeg"),IMAGE_PNG:image("png"),IMAGE_PSD:image("vnd.adobe.photoshop"),IMAGE_SVG:image("svg+xml"),IMAGE_TIFF:image("tiff"),IMAGE_WEBP:image("webp"),TEXT:text("*"),TEXT_CACHE_MANIFEST:text("cache-manifest"),TEXT_CALENDAR:text("calendar"),TEXT_COMMA_SEPARATED_VALUES:text("comma-separated-values"),TEXT_CSS:text("css"),TEXT_CSV:text("csv"),TEXT_HTML:text("html"),TEXT_JAVASCRIPT:text("javascript"),TEXT_PLAIN:text("plain"),TEXT_TSV:text("tab-separated-values"),TEXT_VCARD:text("vcard"),TEXT_VTT:text("vtt"),TEXT_WML:text("vnd.wap.wml"),TEXT_XML:text("xml"),VIDEO:video("*"),VIDEO_AV1:video("av1"),VIDEO_FLV:video("x-flv"),VIDEO_MP4:video("mp4"),VIDEO_MPEG:video("mpeg"),VIDEO_OGG:video("ogg"),VIDEO_QUICKTIME:video("quicktime"),VIDEO_THREE_GPP2:video("3gpp2"),VIDEO_THREE_GPP:video("3gpp"),VIDEO_WEBM:video("webm"),VIDEO_WMV:video("x-ms-wmv")};Object.freeze(t),Object.seal(t);const T={CONNECT:"CONNECT",DELETE:"DELETE",GET:"GET",HEAD:"HEAD",OPTIONS:"OPTIONS",PATCH:"PATCH",POST:"POST",PUT:"PUT",TRACE:"TRACE"};Object.freeze(T),Object.seal(T);const _={CONTINUE:"Continue",SWITCHING_PROTOCOLS:"Switching Protocols",PROCESSING:"Processing",EARLY_HINTS:"Early Hints",OK:"OK",CREATED:"Created",ACCEPTED:"Accepted",NON_AUTHORITATIVE_INFORMATION:"Non-Authoritative Information",NO_CONTENT:"No Content",RESET_CONTENT:"Reset Content",PARTIAL_CONTENT:"Partial Content",MULTI_STATUS:"Multi-Status",ALREADY_REPORTED:"Already Reported",IM_USED:"IM Used",MULTIPLE_CHOICES:"Multiple Choices",MOVED_PERMANENTLY:"Moved Permanently",MOVED_TEMPORARILY:"Found",SEE_OTHER:"See Other",NOT_MODIFIED:"Not Modified",USE_PROXY:"Use Proxy",UNUSED:"Unused",TEMPORARY_REDIRECT:"Temporary Redirect",PERMANENT_REDIRECT:"Permanent Redirect",BAD_REQUEST:"Bad Request",UNAUTHORIZED:"Unauthorized",PAYMENT_REQUIRED:"Payment Required",FORBIDDEN:"Forbidden",NOT_FOUND:"Not Found",METHOD_NOT_ALLOWED:"Method Not Allowed",NOT_ACCEPTABLE:"Not Acceptable",PROXY_AUTHENTICATION_REQUIRED:"Proxy Authentication Required",REQUEST_TIMEOUT:"Request Timeout",CONFLICT:"Conflict",GONE:"Gone",LENGTH_REQUIRED:"Length Required",PRECONDITION_FAILED:"Precondition Failed",PAYLOAD_TOO_LARGE:"Payload Too Large",REQUEST_URI_TOO_LONG:"URI Too Long",UNSUPPORTED_MEDIA_TYPE:"Unsupported Media Type",REQUESTED_RANGE_NOT_SATISFIABLE:"Range Not Satisfiable",EXPECTATION_FAILED:"Expectation Failed",IM_A_TEAPOT:"I'm a Teapot",INSUFFICIENT_SPACE_ON_RESOURCE:"Insufficient space on resource",ENHANCE_YOUR_CALM:"Enhance your calm",MISDIRECTED_REQUEST:"Misdirected Request",UNPROCESSABLE_ENTITY:"Unprocessable Entity",LOCKED:"Locked",FAILED_DEPENDENCY:"Failed Dependency",TOO_EARLY:"Too Early",UPGRADE_REQUIRED:"Upgrade Required",PRECONDITION_REQUIRED:"Precondition Required",TOO_MANY_REQUESTS:"Too Many Requests",WOULD_BLOCK:"Would Block",REQUEST_HEADER_FIELDS_TOO_LARGE:"Request Header Fields Too Large",UNAVAILABLE_FOR_LEGAL_REASONS:"Unavailable For Legal Reasons",INTERNAL_SERVER_ERROR:"Internal Server Error",NOT_IMPLEMENTED:"Not Implemented",BAD_GATEWAY:"Bad Gateway",SERVICE_UNAVAILABLE:"Service Unavailable",GATEWAY_TIMEOUT:"Gateway Timeout",HTTP_VERSION_NOT_SUPPORTED:"HTTP Version Not Supported",VARIANT_ALSO_NEGOTIATES:"Variant Also Negotiates",INSUFFICIENT_STORAGE:"Insufficient Storage",LOOP_DETECTED:"Loop Detected",BANDWIDTH_LIMIT_EXCEEDED:"Bandwidth Limit Exceeded",NOT_EXTENDED:"Not Extended",NETWORK_AUTHENTICATION_REQUIRED:"Network Authentication Required"};Object.freeze(_),Object.seal(_);const o={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,IM_USED:226,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,MOVED_TEMPORARILY:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,UNUSED:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,REQUEST_URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,REQUESTED_RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,INSUFFICIENT_SPACE_ON_RESOURCE:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,WOULD_BLOCK:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};Object.freeze(o),Object.seal(o);const O={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Unused",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",419:"Insufficient space on resource",420:"Enhance your calm",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",430:"Would Block",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};Object.freeze(O),Object.seal(O);const A=[204,205,304];Object.freeze(A),Object.seal(A);const n=[300,301,302,303,305,307,308];Object.freeze(n),Object.seal(n);const R=[502,503,504];function httpStatusCode(E){return Number.parseInt(Array.isArray(E)?""+E[0]:""+E,10)}function httpStatusText(E){return Array.isArray(E)?O[""+E[0]]:O[""+E]}function httpResponse(E,e){const t=httpStatusCode(E);let T=httpStatusText(t);"string"==typeof e?T=e:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4&&(T=E[0].substr(4));const _=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return t>399&&("error"in _||(_.error=!0)),{message:T,statusCode:t,..._}}Object.freeze(R),Object.seal(R);class Header{constructor(E={}){this.headers={...E}}toObject(){return{...this}}valueOf(){return this.toJSON()}toJSON(){return JSON.stringify(this.toObject())}ContentLength(E){return this.headers[e.CONTENT_LENGTH]=""+E,this}ContentType(E=t.APP_JSON,T="",_=""){return this.headers[e.CONTENT_TYPE]=E,T.length&&(this.headers[e.CONTENT_TYPE]+="; charset="+T,_.length&&(this.headers[e.CONTENT_TYPE]+="; boundary="+_)),this}}E.ACCEPTED=202,E.ALREADY_REPORTED=208,E.BAD_GATEWAY=502,E.BAD_REQUEST=400,E.BANDWIDTH_LIMIT_EXCEEDED=509,E.CONFLICT=409,E.CONTINUE=100,E.CREATED=201,E.EARLY_HINTS=103,E.ENHANCE_YOUR_CALM=420,E.EXPECTATION_FAILED=417,E.FAILED_DEPENDENCY=424,E.FORBIDDEN=403,E.GATEWAY_TIMEOUT=504,E.GONE=410,E.HTTP_HEADER=e,E.HTTP_MEDIA_TYPE=t,E.HTTP_METHOD=T,E.HTTP_VERSION_NOT_SUPPORTED=505,E.Header=Header,E.Headers=function Headers(E={}){return new Header(E)},E.IM_A_TEAPOT=418,E.IM_USED=226,E.INSUFFICIENT_SPACE_ON_RESOURCE=419,E.INSUFFICIENT_STORAGE=507,E.INTERNAL_SERVER_ERROR=500,E.LENGTH_REQUIRED=411,E.LOCKED=423,E.LOOP_DETECTED=508,E.METHOD_NOT_ALLOWED=405,E.MISDIRECTED_REQUEST=421,E.MOVED_PERMANENTLY=301,E.MOVED_TEMPORARILY=302,E.MULTIPLE_CHOICES=300,E.MULTI_STATUS=207,E.NETWORK_AUTHENTICATION_REQUIRED=511,E.NON_AUTHORITATIVE_INFORMATION=203,E.NOT_ACCEPTABLE=406,E.NOT_EXTENDED=510,E.NOT_FOUND=404,E.NOT_IMPLEMENTED=501,E.NOT_MODIFIED=304,E.NO_CONTENT=204,E.OK=200,E.PARTIAL_CONTENT=206,E.PAYLOAD_TOO_LARGE=413,E.PAYMENT_REQUIRED=402,E.PERMANENT_REDIRECT=308,E.PRECONDITION_FAILED=412,E.PRECONDITION_REQUIRED=428,E.PROCESSING=102,E.PROXY_AUTHENTICATION_REQUIRED=407,E.REQUESTED_RANGE_NOT_SATISFIABLE=416,E.REQUEST_HEADER_FIELDS_TOO_LARGE=431,E.REQUEST_TIMEOUT=408,E.REQUEST_URI_TOO_LONG=414,E.RESET_CONTENT=205,E.SEE_OTHER=303,E.SERVICE_UNAVAILABLE=503,E.STATUS_CODE_EMPTY=A,E.STATUS_CODE_MEMO=_,E.STATUS_CODE_REDIRECT=n,E.STATUS_CODE_RETRY=R,E.STATUS_CODE_TAG=o,E.STATUS_CODE_TEXT=O,E.SWITCHING_PROTOCOLS=101,E.TEMPORARY_REDIRECT=307,E.TOO_EARLY=425,E.TOO_MANY_REQUESTS=429,E.UNAUTHORIZED=401,E.UNAVAILABLE_FOR_LEGAL_REASONS=451,E.UNPROCESSABLE_ENTITY=422,E.UNSUPPORTED_MEDIA_TYPE=415,E.UNUSED=306,E.UPGRADE_REQUIRED=426,E.USE_PROXY=305,E.VARIANT_ALSO_NEGOTIATES=506,E.WOULD_BLOCK=430,E.httpResponse=httpResponse,E.httpResponseHtml=function httpResponseHtml(E,e){const t=httpStatusCode(E);let T=`<!DOCTYPE html><html><body><h1>${t} ${httpStatusText(t)}</h1>`;return"string"==typeof e?T=`${T}<h2>${e}</h2>`:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4?T=`${T}<h2>${E[0].substr(4)}</h2>`:e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(E=>{T=`${T}<p><strong>${E}</strong><span>${e[E]}</span></p>`}),T+"</body></html>"},E.httpResponseJson=function httpResponseJson(E,e){return JSON.stringify(httpResponse(E,e))},E.httpResponseText=function httpResponseText(E,e){const t=httpStatusCode(E);let T=`${t} ${httpStatusText(t)}`;return"string"==typeof e?T=`${T}\n${e}`:Array.isArray(E)&&"string"==typeof E[0]&&E[0].length>4?T=`${T}\n${E[0].substr(4)}`:e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(E=>{T=`${T}\n${E}\t${e[E]}`}),T},E.httpResponseXml=function httpResponseXml(E,e){let t='<?xml version="1.0" encoding="UTF-8"?><root>';const T=httpResponse(E,e);return Object.keys(T).forEach(E=>{t=`${t}<${E}>${T[E]}</${E}>`}),t+"</root>"},E.httpStatusCode=httpStatusCode,E.httpStatusText=httpStatusText,Object.defineProperty(E,"__esModule",{value:!0})}));
//# sourceMappingURL=http.js.map

@@ -15,15 +15,15 @@ {

"devDependencies": {
"@babel/plugin-proposal-class-properties": "7.10.1",
"@babel/plugin-proposal-private-methods": "7.10.1",
"@babel/preset-env": "7.10.4",
"@babel/plugin-proposal-class-properties": "7.10.4",
"@babel/plugin-proposal-private-methods": "7.10.4",
"@babel/preset-env": "7.11.0",
"@r37r0m0d3l/rollup-config-pkg": "git+https://github.com/r37r0m0d3l/rollup-config-pkg.git",
"babel-eslint": "10.1.0",
"eslint": "7.2.0",
"eslint": "7.7.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-jsdoc": "27.0.6",
"eslint-plugin-prettier": "3.1.3",
"jest": "26.0.1",
"eslint-plugin-jsdoc": "30.3.0",
"eslint-plugin-prettier": "3.1.4",
"jest": "26.4.2",
"npm-check": "5.9.2",
"prettier": "2.0.5",
"rollup": "2.15.0"
"prettier": "2.1.1",
"rollup": "2.26.6"
},

@@ -93,3 +93,3 @@ "engines": {

"types": "./dist/http.d.ts",
"version": "1.0.4"
"version": "1.0.5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc