@d1g1tal/transportr 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/OP3JQ447.js +8 -0
- package/dist/OP3JQ447.js.map +7 -0
- package/dist/headers.d.ts +249 -0
- package/dist/headers.js +2 -0
- package/dist/headers.js.map +7 -0
- package/dist/media-types.d.ts +160 -0
- package/dist/media-types.js +2 -0
- package/dist/media-types.js.map +7 -0
- package/dist/methods.d.ts +274 -0
- package/dist/methods.js +2 -0
- package/dist/methods.js.map +7 -0
- package/dist/response-headers.d.ts +345 -0
- package/dist/response-headers.js +2 -0
- package/dist/response-headers.js.map +7 -0
- package/dist/transportr.d.ts +195 -822
- package/dist/transportr.js +2 -3944
- package/dist/transportr.js.map +4 -4
- package/package.json +30 -5
package/dist/transportr.d.ts
CHANGED
|
@@ -2,163 +2,46 @@ import { Subscription } from "@d1g1tal/subscribr";
|
|
|
2
2
|
import { MediaType } from "@d1g1tal/media-type";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
6
|
-
* @see {@link https://
|
|
5
|
+
* A class that holds a status code and a status text, typically from a {@link Response}
|
|
6
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/status|Response.status
|
|
7
|
+
* @author D1g1talEntr0py <jason.dimeo@gmail.com>
|
|
7
8
|
*/
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
readonly EPUB: "application/epub+zip";
|
|
45
|
-
/** GZip Compressed Archive */
|
|
46
|
-
readonly GZIP: "application/gzip";
|
|
47
|
-
/** Graphics Interchange Format */
|
|
48
|
-
readonly GIF: "image/gif";
|
|
49
|
-
/** HyperText Markup Language (HTML) */
|
|
50
|
-
readonly HTML: "text/html";
|
|
51
|
-
/** Icon Format */
|
|
52
|
-
readonly ICO: "image/vnd.microsoft.icon";
|
|
53
|
-
/** iCalendar Format */
|
|
54
|
-
readonly ICS: "text/calendar";
|
|
55
|
-
/** Java Archive (JAR) */
|
|
56
|
-
readonly JAR: "application/java-archive";
|
|
57
|
-
/** JPEG Image */
|
|
58
|
-
readonly JPEG: "image/jpeg";
|
|
59
|
-
/** JavaScript */
|
|
60
|
-
readonly JAVA_SCRIPT: "text/javascript";
|
|
61
|
-
/** JavaScript Object Notation Format (JSON) */
|
|
62
|
-
readonly JSON: "application/json";
|
|
63
|
-
/** JavaScript Object Notation LD Format */
|
|
64
|
-
readonly JSON_LD: "application/ld+json";
|
|
65
|
-
/** JavaScript Object Notation (JSON) Merge Patch */
|
|
66
|
-
readonly JSON_MERGE_PATCH: "application/merge-patch+json";
|
|
67
|
-
/** Musical Instrument Digital Interface (MIDI) */
|
|
68
|
-
readonly MID: "audio/midi";
|
|
69
|
-
/** Musical Instrument Digital Interface (MIDI) */
|
|
70
|
-
readonly X_MID: "audio/x-midi";
|
|
71
|
-
/** MP3 Audio */
|
|
72
|
-
readonly MP3: "audio/mpeg";
|
|
73
|
-
/** MPEG-4 Audio */
|
|
74
|
-
readonly MP4A: "audio/mp4";
|
|
75
|
-
/** MPEG-4 Video */
|
|
76
|
-
readonly MP4: "video/mp4";
|
|
77
|
-
/** MPEG Video */
|
|
78
|
-
readonly MPEG: "video/mpeg";
|
|
79
|
-
/** Apple Installer Package */
|
|
80
|
-
readonly MPKG: "application/vnd.apple.installer+xml";
|
|
81
|
-
/** OpenDocument Presentation Document */
|
|
82
|
-
readonly ODP: "application/vnd.oasis.opendocument.presentation";
|
|
83
|
-
/** OpenDocument Spreadsheet Document */
|
|
84
|
-
readonly ODS: "application/vnd.oasis.opendocument.spreadsheet";
|
|
85
|
-
/** OpenDocument Text Document */
|
|
86
|
-
readonly ODT: "application/vnd.oasis.opendocument.text";
|
|
87
|
-
/** Ogg Audio */
|
|
88
|
-
readonly OGA: "audio/ogg";
|
|
89
|
-
/** Ogg Video */
|
|
90
|
-
readonly OGV: "video/ogg";
|
|
91
|
-
/** Ogg */
|
|
92
|
-
readonly OGX: "application/ogg";
|
|
93
|
-
/** Opus audio */
|
|
94
|
-
readonly OPUS: "audio/opus";
|
|
95
|
-
/** OpenType Font File */
|
|
96
|
-
readonly OTF: "font/otf";
|
|
97
|
-
/** Portable Network Graphics (PNG) */
|
|
98
|
-
readonly PNG: "image/png";
|
|
99
|
-
/** Adobe Portable Document Format */
|
|
100
|
-
readonly PDF: "application/pdf";
|
|
101
|
-
/** Hypertext Preprocessor (Personal Home Page) */
|
|
102
|
-
readonly PHP: "application/x-httpd-php";
|
|
103
|
-
/** Microsoft PowerPoint */
|
|
104
|
-
readonly PPT: "application/vnd.ms-powerpoint";
|
|
105
|
-
/** Microsoft Office Presentation (OpenXML) */
|
|
106
|
-
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
107
|
-
/** RAR Archive */
|
|
108
|
-
readonly RAR: "application/vnd.rar";
|
|
109
|
-
/** Rich Text Format */
|
|
110
|
-
readonly RTF: "application/rtf";
|
|
111
|
-
/** Bourne Shell Script */
|
|
112
|
-
readonly SH: "application/x-sh";
|
|
113
|
-
/** Scalable Vector Graphics (SVG) */
|
|
114
|
-
readonly SVG: "image/svg+xml";
|
|
115
|
-
/** Tape Archive (TAR) */
|
|
116
|
-
readonly TAR: "application/x-tar";
|
|
117
|
-
/** Tagged Image File Format (TIFF) */
|
|
118
|
-
readonly TIFF: "image/tiff";
|
|
119
|
-
/** MPEG transport stream */
|
|
120
|
-
readonly TRANSPORT_STREAM: "video/mp2t";
|
|
121
|
-
/** TrueType Font */
|
|
122
|
-
readonly TTF: "font/ttf";
|
|
123
|
-
/** Text, (generally ASCII or ISO 8859-n) */
|
|
124
|
-
readonly TEXT: "text/plain";
|
|
125
|
-
/** Microsoft Visio */
|
|
126
|
-
readonly VSD: "application/vnd.visio";
|
|
127
|
-
/** Waveform Audio Format (WAV) */
|
|
128
|
-
readonly WAV: "audio/wav";
|
|
129
|
-
/** Open Web Media Project - Audio */
|
|
130
|
-
readonly WEBA: "audio/webm";
|
|
131
|
-
/** Open Web Media Project - Video */
|
|
132
|
-
readonly WEBM: "video/webm";
|
|
133
|
-
/** WebP Image */
|
|
134
|
-
readonly WEBP: "image/webp";
|
|
135
|
-
/** Web Open Font Format */
|
|
136
|
-
readonly WOFF: "font/woff";
|
|
137
|
-
/** Web Open Font Format */
|
|
138
|
-
readonly WOFF2: "font/woff2";
|
|
139
|
-
/** Form - Encoded */
|
|
140
|
-
readonly FORM: "application/x-www-form-urlencoded";
|
|
141
|
-
/** Multipart FormData */
|
|
142
|
-
readonly MULTIPART_FORM_DATA: "multipart/form-data";
|
|
143
|
-
/** XHTML - The Extensible HyperText Markup Language */
|
|
144
|
-
readonly XHTML: "application/xhtml+xml";
|
|
145
|
-
/** Microsoft Excel Document */
|
|
146
|
-
readonly XLS: "application/vnd.ms-excel";
|
|
147
|
-
/** Microsoft Office Spreadsheet Document (OpenXML) */
|
|
148
|
-
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
149
|
-
/** Extensible Markup Language (XML) */
|
|
150
|
-
readonly XML: "application/xml";
|
|
151
|
-
/** XML User Interface Language (XUL) */
|
|
152
|
-
readonly XUL: "application/vnd.mozilla.xul+xml";
|
|
153
|
-
/** Zip Archive */
|
|
154
|
-
readonly ZIP: "application/zip";
|
|
155
|
-
/** 3GPP audio/video container */
|
|
156
|
-
readonly '3GP': "video/3gpp";
|
|
157
|
-
/** 3GPP2 audio/video container */
|
|
158
|
-
readonly '3G2': "video/3gpp2";
|
|
159
|
-
/** 7-Zip Archive */
|
|
160
|
-
readonly '7Z': "application/x-7z-compressed";
|
|
161
|
-
};
|
|
9
|
+
declare class ResponseStatus {
|
|
10
|
+
private readonly _code;
|
|
11
|
+
private readonly _text;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param code The status code from the {@link Response}
|
|
15
|
+
* @param text The status text from the {@link Response}
|
|
16
|
+
*/
|
|
17
|
+
constructor(code: number, text: string);
|
|
18
|
+
/**
|
|
19
|
+
* Returns the status code from the {@link Response}
|
|
20
|
+
*
|
|
21
|
+
* @returns The status code.
|
|
22
|
+
*/
|
|
23
|
+
get code(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the status text from the {@link Response}.
|
|
26
|
+
*
|
|
27
|
+
* @returns The status text.
|
|
28
|
+
*/
|
|
29
|
+
get text(): string;
|
|
30
|
+
/**
|
|
31
|
+
* A String value that is used in the creation of the default string
|
|
32
|
+
* description of an object. Called by the built-in method {@link Object.prototype.toString}.
|
|
33
|
+
*
|
|
34
|
+
* @returns The default string description of this object.
|
|
35
|
+
*/
|
|
36
|
+
get [Symbol.toStringTag](): string;
|
|
37
|
+
/**
|
|
38
|
+
* tostring method for the class.
|
|
39
|
+
*
|
|
40
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString|Object.prototype.toString}
|
|
41
|
+
* @returns The status code and status text.
|
|
42
|
+
*/
|
|
43
|
+
toString(): string;
|
|
44
|
+
}
|
|
162
45
|
|
|
163
46
|
/**
|
|
164
47
|
* Defining a constant object with all the HTTP request headers.
|
|
@@ -409,664 +292,164 @@ declare const HttpRequestHeader: {
|
|
|
409
292
|
};
|
|
410
293
|
|
|
411
294
|
/**
|
|
412
|
-
*
|
|
295
|
+
* A collection of some of the available HTTP media types.
|
|
296
|
+
* @see {@link https://www.iana.org/assignments/media-types/media-types.xhtml | IANA Media Types}
|
|
413
297
|
*/
|
|
414
|
-
declare const
|
|
415
|
-
/**
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
readonly
|
|
451
|
-
/**
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
readonly
|
|
473
|
-
/**
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
readonly
|
|
517
|
-
/**
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
readonly
|
|
567
|
-
/**
|
|
568
|
-
* The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final
|
|
569
|
-
* recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK)
|
|
570
|
-
* response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards
|
|
571
|
-
* value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.
|
|
572
|
-
*
|
|
573
|
-
* TRACE allows the client to see what is being received at the other end of the request chain and use that data for
|
|
574
|
-
* testing or diagnostic information. The value of the Via header field (section 14.45) is of particular interest,
|
|
575
|
-
* since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the client to limit the
|
|
576
|
-
* length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.
|
|
577
|
-
*
|
|
578
|
-
* If the request is valid, the response SHOULD contain the entire request message in the entity-body, with a
|
|
579
|
-
* Content-Type of "message/http". Responses to this method MUST NOT be cached.
|
|
580
|
-
*/
|
|
581
|
-
readonly TRACE: "TRACE";
|
|
582
|
-
/**
|
|
583
|
-
* This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a
|
|
584
|
-
* tunnel (e.g. SSL tunneling [44]).
|
|
585
|
-
*/
|
|
586
|
-
readonly CONNECT: "CONNECT";
|
|
587
|
-
/**
|
|
588
|
-
* The PATCH method requests that a set of changes described in the
|
|
589
|
-
* request entity be applied to the resource identified by the Request-
|
|
590
|
-
* URI. The set of changes is represented in a format called a "patch
|
|
591
|
-
* document" identified by a media type. If the Request-URI does not
|
|
592
|
-
* point to an existing resource, the server MAY create a new resource,
|
|
593
|
-
* depending on the patch document type (whether it can logically modify
|
|
594
|
-
* a null resource) and permissions, etc.
|
|
595
|
-
*
|
|
596
|
-
* The difference between the PUT and PATCH requests is reflected in the
|
|
597
|
-
* way the server processes the enclosed entity to modify the resource
|
|
598
|
-
* identified by the Request-URI. In a PUT request, the enclosed entity
|
|
599
|
-
* is considered to be a modified version of the resource stored on the
|
|
600
|
-
* origin server, and the client is requesting that the stored version
|
|
601
|
-
* be replaced. With PATCH, however, the enclosed entity contains a set
|
|
602
|
-
* of instructions describing how a resource currently residing on the
|
|
603
|
-
* origin server should be modified to produce a new version. The PATCH
|
|
604
|
-
* method affects the resource identified by the Request-URI, and it
|
|
605
|
-
* also MAY have side effects on other resources; i.e., new resources
|
|
606
|
-
* may be created, or existing ones modified, by the application of a
|
|
607
|
-
* PATCH.
|
|
608
|
-
*
|
|
609
|
-
* PATCH is neither safe nor idempotent as defined by [RFC2616], Section
|
|
610
|
-
* 9.1.
|
|
611
|
-
*
|
|
612
|
-
* A PATCH request can be issued in such a way as to be idempotent,
|
|
613
|
-
* which also helps prevent bad outcomes from collisions between two
|
|
614
|
-
* PATCH requests on the same resource in a similar time frame.
|
|
615
|
-
* Collisions from multiple PATCH requests may be more dangerous than
|
|
616
|
-
* PUT collisions because some patch formats need to operate from a
|
|
617
|
-
* known base-point or else they will corrupt the resource. Clients
|
|
618
|
-
* using this kind of patch application SHOULD use a conditional request
|
|
619
|
-
* such that the request will fail if the resource has been updated
|
|
620
|
-
* since the client last accessed the resource. For example, the client
|
|
621
|
-
* can use a strong ETag [RFC2616] in an If-Match header on the PATCH
|
|
622
|
-
* request.
|
|
623
|
-
*
|
|
624
|
-
* There are also cases where patch formats do not need to operate from
|
|
625
|
-
* a known base-point (e.g., appending text lines to log files, or non-
|
|
626
|
-
* colliding rows to database tables), in which case the same care in
|
|
627
|
-
* client requests is not needed.
|
|
628
|
-
*
|
|
629
|
-
* The server MUST apply the entire set of changes atomically and never
|
|
630
|
-
* provide (e.g., in response to a GET during this operation) a
|
|
631
|
-
* partially modified representation. If the entire patch document
|
|
632
|
-
* cannot be successfully applied, then the server MUST NOT apply any of
|
|
633
|
-
* the changes. The determination of what constitutes a successful
|
|
634
|
-
* PATCH can vary depending on the patch document and the type of
|
|
635
|
-
* resource(s) being modified. For example, the common 'diff' utility
|
|
636
|
-
* can generate a patch document that applies to multiple files in a
|
|
637
|
-
* directory hierarchy. The atomicity requirement holds for all
|
|
638
|
-
* directly affected files. See "Error Handling", Section 2.2, for
|
|
639
|
-
* details on status codes and possible error conditions.
|
|
640
|
-
*
|
|
641
|
-
* If the request passes through a cache and the Request-URI identifies
|
|
642
|
-
* one or more currently cached entities, those entries SHOULD be
|
|
643
|
-
* treated as stale. A response to this method is only cacheable if it
|
|
644
|
-
* contains explicit freshness information (such as an Expires header or
|
|
645
|
-
* "Cache-Control: max-age" directive) as well as the Content-Location
|
|
646
|
-
* header matching the Request-URI, indicating that the PATCH response
|
|
647
|
-
* body is a resource representation. A cached PATCH response can only
|
|
648
|
-
* be used to respond to subsequent GET and HEAD requests; it MUST NOT
|
|
649
|
-
* be used to respond to other methods (in particular, PATCH).
|
|
650
|
-
*
|
|
651
|
-
* Note that entity-headers contained in the request apply only to the
|
|
652
|
-
* contained patch document and MUST NOT be applied to the resource
|
|
653
|
-
* being modified. Thus, a Content-Language header could be present on
|
|
654
|
-
* the request, but it would only mean (for whatever that's worth) that
|
|
655
|
-
* the patch document had a language. Servers SHOULD NOT store such
|
|
656
|
-
* headers except as trace information, and SHOULD NOT use such header
|
|
657
|
-
* values the same way they might be used on PUT requests. Therefore,
|
|
658
|
-
* this document does not specify a way to modify a document's Content-
|
|
659
|
-
* Type or Content-Language value through headers, though a mechanism
|
|
660
|
-
* could well be designed to achieve this goal through a patch document.
|
|
661
|
-
*
|
|
662
|
-
* There is no guarantee that a resource can be modified with PATCH.
|
|
663
|
-
* Further, it is expected that different patch document formats will be
|
|
664
|
-
* appropriate for different types of resources and that no single
|
|
665
|
-
* format will be appropriate for all types of resources. Therefore,
|
|
666
|
-
* there is no single default patch document format that implementations
|
|
667
|
-
* are required to support. Servers MUST ensure that a received patch
|
|
668
|
-
* document is appropriate for the type of resource identified by the
|
|
669
|
-
* Request-URI.
|
|
670
|
-
*
|
|
671
|
-
* Clients need to choose when to use PATCH rather than PUT. For
|
|
672
|
-
* example, if the patch document size is larger than the size of the
|
|
673
|
-
* new resource data that would be used in a PUT, then it might make
|
|
674
|
-
* sense to use PUT instead of PATCH. A comparison to POST is even more
|
|
675
|
-
* difficult, because POST is used in widely varying ways and can
|
|
676
|
-
* encompass PUT and PATCH-like operations if the server chooses. If
|
|
677
|
-
* the operation does not modify the resource identified by the Request-
|
|
678
|
-
* URI in a predictable way, POST should be considered instead of PATCH
|
|
679
|
-
* or PUT.
|
|
680
|
-
*/
|
|
681
|
-
readonly PATCH: "PATCH";
|
|
682
|
-
};
|
|
683
|
-
|
|
684
|
-
/** Defining a constant object HTTP response headers */
|
|
685
|
-
declare const HttpResponseHeader: {
|
|
686
|
-
/**
|
|
687
|
-
* Implemented as a misunderstanding of the HTTP specifications. Common because of mistakes in implementations of early HTTP versions. Has exactly the same functionality as standard Connection field.
|
|
688
|
-
*
|
|
689
|
-
* @example
|
|
690
|
-
* proxy-connection: keep-alive
|
|
691
|
-
*/
|
|
692
|
-
readonly PROXY_CONNECTION: "proxy-connection";
|
|
693
|
-
/**
|
|
694
|
-
* Server-side deep packet insertion of a unique ID identifying customers of Verizon Wireless, also known as "perma-cookie" or "supercookie"
|
|
695
|
-
*
|
|
696
|
-
* @example
|
|
697
|
-
* x-uidh: ...
|
|
698
|
-
*/
|
|
699
|
-
readonly X_UIDH: "x-uidh";
|
|
700
|
-
/**
|
|
701
|
-
* Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKEN
|
|
702
|
-
*
|
|
703
|
-
* @example
|
|
704
|
-
* x-csrf-token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
|
|
705
|
-
*/
|
|
706
|
-
readonly X_CSRF_TOKEN: "x-csrf-token";
|
|
707
|
-
/**
|
|
708
|
-
* Specifying which web sites can participate in cross-origin resource sharing
|
|
709
|
-
*
|
|
710
|
-
* @example
|
|
711
|
-
* access-control-allow-origin: *
|
|
712
|
-
* Provisional
|
|
713
|
-
*/
|
|
714
|
-
readonly ACCESS_CONTROL_ALLOW_ORIGIN: "access-control-allow-origin";
|
|
715
|
-
/**
|
|
716
|
-
* Specifies which patch document formats this server supports
|
|
717
|
-
*
|
|
718
|
-
* @example
|
|
719
|
-
* accept-patch: text/example,charset=utf-8
|
|
720
|
-
* Permanent
|
|
721
|
-
*/
|
|
722
|
-
readonly ACCEPT_PATCH: "accept-patch";
|
|
723
|
-
/**
|
|
724
|
-
* What partial content range types this server supports via byte serving
|
|
725
|
-
*
|
|
726
|
-
* @example
|
|
727
|
-
* accept-ranges: bytes
|
|
728
|
-
* Permanent
|
|
729
|
-
*/
|
|
730
|
-
readonly ACCEPT_RANGES: "accept-ranges";
|
|
731
|
-
/**
|
|
732
|
-
* The age the object has been in a proxy cache in seconds
|
|
733
|
-
*
|
|
734
|
-
* @example
|
|
735
|
-
* age: 12
|
|
736
|
-
* Permanent
|
|
737
|
-
*/
|
|
738
|
-
readonly AGE: "age";
|
|
739
|
-
/**
|
|
740
|
-
* Valid actions for a specified resource. To be used for a 405 Method not allowed
|
|
741
|
-
*
|
|
742
|
-
* @example
|
|
743
|
-
* allow: GET, HEAD
|
|
744
|
-
* Permanent
|
|
745
|
-
*/
|
|
746
|
-
readonly ALLOW: "allow";
|
|
747
|
-
/**
|
|
748
|
-
* Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
|
|
749
|
-
*
|
|
750
|
-
* @example
|
|
751
|
-
* cache-control: max-age=3600
|
|
752
|
-
* Permanent
|
|
753
|
-
*/
|
|
754
|
-
readonly CACHE_CONTROL: "cache-control";
|
|
755
|
-
/**
|
|
756
|
-
* Control options for the current connection and list of hop-by-hop response fields
|
|
757
|
-
*
|
|
758
|
-
* @example
|
|
759
|
-
* connection: close
|
|
760
|
-
* Permanent
|
|
761
|
-
*/
|
|
762
|
-
readonly CONNECTION: "connection";
|
|
763
|
-
/**
|
|
764
|
-
* An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
|
|
765
|
-
*
|
|
766
|
-
* @example
|
|
767
|
-
* content-disposition: attachment, filename="fname.ext"
|
|
768
|
-
* Permanent
|
|
769
|
-
*/
|
|
770
|
-
readonly CONTENT_DISPOSITION: "content-disposition";
|
|
771
|
-
/**
|
|
772
|
-
* The type of encoding used on the data. See HTTP compression.
|
|
773
|
-
*
|
|
774
|
-
* @example
|
|
775
|
-
* content-encoding: gzip
|
|
776
|
-
* Permanent
|
|
777
|
-
*/
|
|
778
|
-
readonly CONTENT_ENCODING: "content-encoding";
|
|
779
|
-
/**
|
|
780
|
-
* The natural language or languages of the intended audience for the enclosed content
|
|
781
|
-
*
|
|
782
|
-
* @example
|
|
783
|
-
* content-language: da
|
|
784
|
-
* Permanent
|
|
785
|
-
*/
|
|
786
|
-
readonly CONTENT_LANGUAGE: "content-language";
|
|
787
|
-
/**
|
|
788
|
-
* The length of the response body in octets (8-bit bytes)
|
|
789
|
-
*
|
|
790
|
-
* @example
|
|
791
|
-
* content-length: 348
|
|
792
|
-
* Permanent
|
|
793
|
-
*/
|
|
794
|
-
readonly CONTENT_LENGTH: "content-length";
|
|
795
|
-
/**
|
|
796
|
-
* An alternate location for the returned data
|
|
797
|
-
*
|
|
798
|
-
* @example
|
|
799
|
-
* content-location: /index.htm
|
|
800
|
-
* Permanent
|
|
801
|
-
*/
|
|
802
|
-
readonly CONTENT_LOCATION: "content-location";
|
|
803
|
-
/**
|
|
804
|
-
* Where in a full body message this partial message belongs
|
|
805
|
-
*
|
|
806
|
-
* @example
|
|
807
|
-
* content-range: bytes 21010-47021/47022
|
|
808
|
-
* Permanent
|
|
809
|
-
*/
|
|
810
|
-
readonly CONTENT_RANGE: "content-range";
|
|
811
|
-
/**
|
|
812
|
-
* The MIME type of this content
|
|
813
|
-
*
|
|
814
|
-
* @example
|
|
815
|
-
* content-type: text/html, charset=utf-8
|
|
816
|
-
* Permanent
|
|
817
|
-
*/
|
|
818
|
-
readonly CONTENT_TYPE: "content-type";
|
|
819
|
-
/**
|
|
820
|
-
* The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
|
|
821
|
-
*
|
|
822
|
-
* @example
|
|
823
|
-
* date: Tue, 15 Nov 1994 08:12:31 GMT
|
|
824
|
-
* Permanent
|
|
825
|
-
*/
|
|
826
|
-
readonly DATE: "date";
|
|
827
|
-
/**
|
|
828
|
-
* An identifier for a specific version of a resource, often a message digest
|
|
829
|
-
*
|
|
830
|
-
* @example
|
|
831
|
-
* etag: "737060cd8c284d8af7ad3082f209582d"
|
|
832
|
-
* Permanent
|
|
833
|
-
*/
|
|
834
|
-
readonly ETAG: "etag";
|
|
835
|
-
/**
|
|
836
|
-
* Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
|
|
837
|
-
*
|
|
838
|
-
* @example
|
|
839
|
-
* expires: Thu, 01 Dec 1994 16:00:00 GMT
|
|
840
|
-
* Permanent
|
|
841
|
-
*/
|
|
842
|
-
readonly EXPIRES: "expires";
|
|
843
|
-
/**
|
|
844
|
-
* The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
|
|
845
|
-
*
|
|
846
|
-
* @example
|
|
847
|
-
* last-modified: Tue, 15 Nov 1994 12:45:26 GMT
|
|
848
|
-
* Permanent
|
|
849
|
-
*/
|
|
850
|
-
readonly LAST_MODIFIED: "last-modified";
|
|
851
|
-
/**
|
|
852
|
-
* Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
|
|
853
|
-
*
|
|
854
|
-
* @example
|
|
855
|
-
* link: </feed>, rel="alternate"
|
|
856
|
-
* Permanent
|
|
857
|
-
*/
|
|
858
|
-
readonly LINK: "link";
|
|
859
|
-
/**
|
|
860
|
-
* Used in redirection, or when a new resource has been created.
|
|
861
|
-
*
|
|
862
|
-
* @example
|
|
863
|
-
* location: http://www.w3.org/pub/WWW/People.html
|
|
864
|
-
* Permanent
|
|
865
|
-
*/
|
|
866
|
-
readonly LOCATION: "location";
|
|
867
|
-
/**
|
|
868
|
-
* This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy". However, P3P did not take off, most browsers have never fully
|
|
869
|
-
* implemented it, a lot of websites set this field with fake policy text, that was enough to fool browsers the existence of P3P policy and grant permissions for third party cookies.
|
|
870
|
-
*
|
|
871
|
-
* @example
|
|
872
|
-
* p3p: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
|
|
873
|
-
* Permanent
|
|
874
|
-
*/
|
|
875
|
-
readonly P3P: "p3p";
|
|
876
|
-
/**
|
|
877
|
-
* Implementation-specific fields that may have various effects anywhere along the request-response chain.
|
|
878
|
-
*
|
|
879
|
-
* @example
|
|
880
|
-
* pragma: no-cache
|
|
881
|
-
* Permanent
|
|
882
|
-
*/
|
|
883
|
-
readonly PRAGMA: "pragma";
|
|
884
|
-
/**
|
|
885
|
-
* Request authentication to access the proxy.
|
|
886
|
-
*
|
|
887
|
-
* @example
|
|
888
|
-
* proxy-authenticate: Basic
|
|
889
|
-
* Permanent
|
|
890
|
-
*/
|
|
891
|
-
readonly PROXY_AUTHENTICATION: "proxy-authenticate";
|
|
892
|
-
/**
|
|
893
|
-
* HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
|
|
894
|
-
*
|
|
895
|
-
* @example
|
|
896
|
-
* public-key-pins: max-age=2592000, pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=",
|
|
897
|
-
* Permanent
|
|
898
|
-
*/
|
|
899
|
-
readonly PUBLIC_KEY_PINS: "public-key-pins";
|
|
900
|
-
/**
|
|
901
|
-
* If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
|
|
902
|
-
*
|
|
903
|
-
* @example
|
|
904
|
-
* retry-after: 120
|
|
905
|
-
* retry-after: Fri, 07 Nov 2014 23:59:59 GMT
|
|
906
|
-
* Permanent
|
|
907
|
-
*/
|
|
908
|
-
readonly RETRY_AFTER: "retry-after";
|
|
909
|
-
/**
|
|
910
|
-
* A name for the server
|
|
911
|
-
*
|
|
912
|
-
* @example
|
|
913
|
-
* server: Apache/2.4.1 (Unix)
|
|
914
|
-
* Permanent
|
|
915
|
-
*/
|
|
916
|
-
readonly SERVER: "server";
|
|
917
|
-
/**
|
|
918
|
-
* An HTTP cookie
|
|
919
|
-
*
|
|
920
|
-
* @example
|
|
921
|
-
* set-cookie: UserID=JohnDoe, Max-Age=3600, Version=1
|
|
922
|
-
* Permanent
|
|
923
|
-
*/
|
|
924
|
-
readonly SET_COOKIE: "set-cookie";
|
|
925
|
-
/**
|
|
926
|
-
* CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230.
|
|
927
|
-
*
|
|
928
|
-
* @example
|
|
929
|
-
* status: 200 OK
|
|
930
|
-
*/
|
|
931
|
-
readonly STATUS: "status";
|
|
932
|
-
/**
|
|
933
|
-
* A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
|
|
934
|
-
*
|
|
935
|
-
* @example
|
|
936
|
-
* strict-transport-security: max-age=16070400, includeSubDomains
|
|
937
|
-
* Permanent
|
|
938
|
-
*/
|
|
939
|
-
readonly STRICT_TRANSPORT_SECURITY: "strict-transport-security";
|
|
940
|
-
/**
|
|
941
|
-
* The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
|
|
942
|
-
*
|
|
943
|
-
* @example
|
|
944
|
-
* trailer: Max-Forwards
|
|
945
|
-
* Permanent
|
|
946
|
-
*/
|
|
947
|
-
readonly TRAILER: "trailer";
|
|
948
|
-
/**
|
|
949
|
-
* The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
|
|
950
|
-
*
|
|
951
|
-
* @example
|
|
952
|
-
* transfer-encoding: chunked
|
|
953
|
-
* Permanent
|
|
954
|
-
*/
|
|
955
|
-
readonly TRANSFER_ENCODING: "transfer-encoding";
|
|
956
|
-
/**
|
|
957
|
-
* Ask the client to upgrade to another protocol.
|
|
958
|
-
*
|
|
959
|
-
* @example
|
|
960
|
-
* upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
|
|
961
|
-
* Permanent
|
|
962
|
-
*/
|
|
963
|
-
readonly UPGRADE: "upgrade";
|
|
964
|
-
/**
|
|
965
|
-
* Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
|
|
966
|
-
*
|
|
967
|
-
* @example
|
|
968
|
-
* vary: *
|
|
969
|
-
* Permanent
|
|
970
|
-
*/
|
|
971
|
-
readonly VARY: "vary";
|
|
972
|
-
/**
|
|
973
|
-
* Informs the client of proxies through which the response was sent.
|
|
974
|
-
*
|
|
975
|
-
* @example
|
|
976
|
-
* via: 1.0 fred, 1.1 example.com (Apache/1.1)
|
|
977
|
-
* Permanent
|
|
978
|
-
*/
|
|
979
|
-
readonly VIA: "via";
|
|
980
|
-
/**
|
|
981
|
-
* A general warning about possible problems with the entity body.
|
|
982
|
-
*
|
|
983
|
-
* @example
|
|
984
|
-
* warning: 199 Miscellaneous warning
|
|
985
|
-
* Permanent
|
|
986
|
-
*/
|
|
987
|
-
readonly WARNING: "warning";
|
|
988
|
-
/**
|
|
989
|
-
* Indicates the authentication scheme that should be used to access the requested entity.
|
|
990
|
-
*
|
|
991
|
-
* @example
|
|
992
|
-
* www-authenticate: Basic
|
|
993
|
-
* Permanent
|
|
994
|
-
*/
|
|
995
|
-
readonly WWW_AUTHENTICATE: "www-authenticate";
|
|
996
|
-
/**
|
|
997
|
-
* Cross-site scripting (XSS) filter
|
|
998
|
-
*
|
|
999
|
-
* @example
|
|
1000
|
-
* x-xss-protection: 1, mode=block
|
|
1001
|
-
*/
|
|
1002
|
-
readonly X_XSS_PROTECTION: "x-xss-protection";
|
|
1003
|
-
/**
|
|
1004
|
-
* The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed
|
|
1005
|
-
* to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
|
|
1006
|
-
* This helps guard against cross-site scripting attacks (Cross-site_scripting).
|
|
1007
|
-
*
|
|
1008
|
-
* @example
|
|
1009
|
-
* content-security-policy: default-src
|
|
1010
|
-
*/
|
|
1011
|
-
readonly CONTENT_SECURITY_POLICY: "content-security-policy";
|
|
1012
|
-
/**
|
|
1013
|
-
* The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.
|
|
1014
|
-
*
|
|
1015
|
-
* @example
|
|
1016
|
-
* x-content-type-options: nosniff
|
|
1017
|
-
*/
|
|
1018
|
-
readonly X_CONTENT_TYPE_OPTIONS: "x-content-type-options";
|
|
1019
|
-
/**
|
|
1020
|
-
* specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)
|
|
1021
|
-
*
|
|
1022
|
-
* @example
|
|
1023
|
-
* x-powered-by: PHP/5.4.0
|
|
1024
|
-
*/
|
|
1025
|
-
readonly X_POWERED_BY: "x-powered-by";
|
|
298
|
+
declare const HttpMediaType: {
|
|
299
|
+
/** Advanced Audio Coding (AAC) */
|
|
300
|
+
readonly AAC: "audio/aac";
|
|
301
|
+
/** AbiWord */
|
|
302
|
+
readonly ABW: "application/x-abiword";
|
|
303
|
+
/** Archive document (multiple files embedded) */
|
|
304
|
+
readonly ARC: "application/x-freearc";
|
|
305
|
+
/** AVIF image */
|
|
306
|
+
readonly AVIF: "image/avif";
|
|
307
|
+
/** Audio Video Interleave (AVI) */
|
|
308
|
+
readonly AVI: "video/x-msvideo";
|
|
309
|
+
/** Amazon Kindle eBook format */
|
|
310
|
+
readonly AZW: "application/vnd.amazon.ebook";
|
|
311
|
+
/** Binary Data */
|
|
312
|
+
readonly BIN: "application/octet-stream";
|
|
313
|
+
/** Windows OS/2 Bitmap Graphics */
|
|
314
|
+
readonly BMP: "image/bmp";
|
|
315
|
+
/** Bzip Archive */
|
|
316
|
+
readonly BZIP: "application/x-bzip";
|
|
317
|
+
/** Bzip2 Archive */
|
|
318
|
+
readonly BZIP2: "application/x-bzip2";
|
|
319
|
+
/** CD audio */
|
|
320
|
+
readonly CDA: "application/x-cdf";
|
|
321
|
+
/** C Shell Script */
|
|
322
|
+
readonly CSH: "application/x-csh";
|
|
323
|
+
/** Cascading Style Sheets (CSS) */
|
|
324
|
+
readonly CSS: "text/css";
|
|
325
|
+
/** Comma-Separated Values */
|
|
326
|
+
readonly CSV: "text/csv";
|
|
327
|
+
/** Microsoft Office Word Document */
|
|
328
|
+
readonly DOC: "application/msword";
|
|
329
|
+
/** Microsoft Office Word Document (OpenXML) */
|
|
330
|
+
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
331
|
+
/** Microsoft Embedded OpenType */
|
|
332
|
+
readonly EOT: "application/vnd.ms-fontobject";
|
|
333
|
+
/** Electronic Publication (EPUB) */
|
|
334
|
+
readonly EPUB: "application/epub+zip";
|
|
335
|
+
/** GZip Compressed Archive */
|
|
336
|
+
readonly GZIP: "application/gzip";
|
|
337
|
+
/** Graphics Interchange Format */
|
|
338
|
+
readonly GIF: "image/gif";
|
|
339
|
+
/** HyperText Markup Language (HTML) */
|
|
340
|
+
readonly HTML: "text/html";
|
|
341
|
+
/** Icon Format */
|
|
342
|
+
readonly ICO: "image/vnd.microsoft.icon";
|
|
343
|
+
/** iCalendar Format */
|
|
344
|
+
readonly ICS: "text/calendar";
|
|
345
|
+
/** Java Archive (JAR) */
|
|
346
|
+
readonly JAR: "application/java-archive";
|
|
347
|
+
/** JPEG Image */
|
|
348
|
+
readonly JPEG: "image/jpeg";
|
|
349
|
+
/** JavaScript */
|
|
350
|
+
readonly JAVA_SCRIPT: "text/javascript";
|
|
351
|
+
/** JavaScript Object Notation Format (JSON) */
|
|
352
|
+
readonly JSON: "application/json";
|
|
353
|
+
/** JavaScript Object Notation LD Format */
|
|
354
|
+
readonly JSON_LD: "application/ld+json";
|
|
355
|
+
/** JavaScript Object Notation (JSON) Merge Patch */
|
|
356
|
+
readonly JSON_MERGE_PATCH: "application/merge-patch+json";
|
|
357
|
+
/** Musical Instrument Digital Interface (MIDI) */
|
|
358
|
+
readonly MID: "audio/midi";
|
|
359
|
+
/** Musical Instrument Digital Interface (MIDI) */
|
|
360
|
+
readonly X_MID: "audio/x-midi";
|
|
361
|
+
/** MP3 Audio */
|
|
362
|
+
readonly MP3: "audio/mpeg";
|
|
363
|
+
/** MPEG-4 Audio */
|
|
364
|
+
readonly MP4A: "audio/mp4";
|
|
365
|
+
/** MPEG-4 Video */
|
|
366
|
+
readonly MP4: "video/mp4";
|
|
367
|
+
/** MPEG Video */
|
|
368
|
+
readonly MPEG: "video/mpeg";
|
|
369
|
+
/** Apple Installer Package */
|
|
370
|
+
readonly MPKG: "application/vnd.apple.installer+xml";
|
|
371
|
+
/** OpenDocument Presentation Document */
|
|
372
|
+
readonly ODP: "application/vnd.oasis.opendocument.presentation";
|
|
373
|
+
/** OpenDocument Spreadsheet Document */
|
|
374
|
+
readonly ODS: "application/vnd.oasis.opendocument.spreadsheet";
|
|
375
|
+
/** OpenDocument Text Document */
|
|
376
|
+
readonly ODT: "application/vnd.oasis.opendocument.text";
|
|
377
|
+
/** Ogg Audio */
|
|
378
|
+
readonly OGA: "audio/ogg";
|
|
379
|
+
/** Ogg Video */
|
|
380
|
+
readonly OGV: "video/ogg";
|
|
381
|
+
/** Ogg */
|
|
382
|
+
readonly OGX: "application/ogg";
|
|
383
|
+
/** Opus audio */
|
|
384
|
+
readonly OPUS: "audio/opus";
|
|
385
|
+
/** OpenType Font File */
|
|
386
|
+
readonly OTF: "font/otf";
|
|
387
|
+
/** Portable Network Graphics (PNG) */
|
|
388
|
+
readonly PNG: "image/png";
|
|
389
|
+
/** Adobe Portable Document Format */
|
|
390
|
+
readonly PDF: "application/pdf";
|
|
391
|
+
/** Hypertext Preprocessor (Personal Home Page) */
|
|
392
|
+
readonly PHP: "application/x-httpd-php";
|
|
393
|
+
/** Microsoft PowerPoint */
|
|
394
|
+
readonly PPT: "application/vnd.ms-powerpoint";
|
|
395
|
+
/** Microsoft Office Presentation (OpenXML) */
|
|
396
|
+
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
397
|
+
/** RAR Archive */
|
|
398
|
+
readonly RAR: "application/vnd.rar";
|
|
399
|
+
/** Rich Text Format */
|
|
400
|
+
readonly RTF: "application/rtf";
|
|
401
|
+
/** Bourne Shell Script */
|
|
402
|
+
readonly SH: "application/x-sh";
|
|
403
|
+
/** Scalable Vector Graphics (SVG) */
|
|
404
|
+
readonly SVG: "image/svg+xml";
|
|
405
|
+
/** Tape Archive (TAR) */
|
|
406
|
+
readonly TAR: "application/x-tar";
|
|
407
|
+
/** Tagged Image File Format (TIFF) */
|
|
408
|
+
readonly TIFF: "image/tiff";
|
|
409
|
+
/** MPEG transport stream */
|
|
410
|
+
readonly TRANSPORT_STREAM: "video/mp2t";
|
|
411
|
+
/** TrueType Font */
|
|
412
|
+
readonly TTF: "font/ttf";
|
|
413
|
+
/** Text, (generally ASCII or ISO 8859-n) */
|
|
414
|
+
readonly TEXT: "text/plain";
|
|
415
|
+
/** Microsoft Visio */
|
|
416
|
+
readonly VSD: "application/vnd.visio";
|
|
417
|
+
/** Waveform Audio Format (WAV) */
|
|
418
|
+
readonly WAV: "audio/wav";
|
|
419
|
+
/** Open Web Media Project - Audio */
|
|
420
|
+
readonly WEBA: "audio/webm";
|
|
421
|
+
/** Open Web Media Project - Video */
|
|
422
|
+
readonly WEBM: "video/webm";
|
|
423
|
+
/** WebP Image */
|
|
424
|
+
readonly WEBP: "image/webp";
|
|
425
|
+
/** Web Open Font Format */
|
|
426
|
+
readonly WOFF: "font/woff";
|
|
427
|
+
/** Web Open Font Format */
|
|
428
|
+
readonly WOFF2: "font/woff2";
|
|
429
|
+
/** Form - Encoded */
|
|
430
|
+
readonly FORM: "application/x-www-form-urlencoded";
|
|
431
|
+
/** Multipart FormData */
|
|
432
|
+
readonly MULTIPART_FORM_DATA: "multipart/form-data";
|
|
433
|
+
/** XHTML - The Extensible HyperText Markup Language */
|
|
434
|
+
readonly XHTML: "application/xhtml+xml";
|
|
435
|
+
/** Microsoft Excel Document */
|
|
436
|
+
readonly XLS: "application/vnd.ms-excel";
|
|
437
|
+
/** Microsoft Office Spreadsheet Document (OpenXML) */
|
|
438
|
+
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
439
|
+
/** Extensible Markup Language (XML) */
|
|
440
|
+
readonly XML: "application/xml";
|
|
441
|
+
/** XML User Interface Language (XUL) */
|
|
442
|
+
readonly XUL: "application/vnd.mozilla.xul+xml";
|
|
443
|
+
/** Zip Archive */
|
|
444
|
+
readonly ZIP: "application/zip";
|
|
445
|
+
/** 3GPP audio/video container */
|
|
446
|
+
readonly '3GP': "video/3gpp";
|
|
447
|
+
/** 3GPP2 audio/video container */
|
|
448
|
+
readonly '3G2': "video/3gpp2";
|
|
449
|
+
/** 7-Zip Archive */
|
|
450
|
+
readonly '7Z': "application/x-7z-compressed";
|
|
1026
451
|
};
|
|
1027
452
|
|
|
1028
|
-
/**
|
|
1029
|
-
* A class that holds a status code and a status text, typically from a {@link Response}
|
|
1030
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/status|Response.status
|
|
1031
|
-
* @author D1g1talEntr0py <jason.dimeo@gmail.com>
|
|
1032
|
-
*/
|
|
1033
|
-
declare class ResponseStatus {
|
|
1034
|
-
private readonly _code;
|
|
1035
|
-
private readonly _text;
|
|
1036
|
-
/**
|
|
1037
|
-
*
|
|
1038
|
-
* @param code The status code from the {@link Response}
|
|
1039
|
-
* @param text The status text from the {@link Response}
|
|
1040
|
-
*/
|
|
1041
|
-
constructor(code: number, text: string);
|
|
1042
|
-
/**
|
|
1043
|
-
* Returns the status code from the {@link Response}
|
|
1044
|
-
*
|
|
1045
|
-
* @returns The status code.
|
|
1046
|
-
*/
|
|
1047
|
-
get code(): number;
|
|
1048
|
-
/**
|
|
1049
|
-
* Returns the status text from the {@link Response}.
|
|
1050
|
-
*
|
|
1051
|
-
* @returns The status text.
|
|
1052
|
-
*/
|
|
1053
|
-
get text(): string;
|
|
1054
|
-
/**
|
|
1055
|
-
* A String value that is used in the creation of the default string
|
|
1056
|
-
* description of an object. Called by the built-in method {@link Object.prototype.toString}.
|
|
1057
|
-
*
|
|
1058
|
-
* @returns The default string description of this object.
|
|
1059
|
-
*/
|
|
1060
|
-
get [Symbol.toStringTag](): string;
|
|
1061
|
-
/**
|
|
1062
|
-
* tostring method for the class.
|
|
1063
|
-
*
|
|
1064
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString|Object.prototype.toString}
|
|
1065
|
-
* @returns The status code and status text.
|
|
1066
|
-
*/
|
|
1067
|
-
toString(): string;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
453
|
type Function<P = any, R = unknown> = (...args: P[]) => R;
|
|
1071
454
|
type JsonPrimitive = string | number | boolean | null;
|
|
1072
455
|
type JsonArray<T = any> = T extends any ? Array<JsonValue<T>> : never;
|
|
@@ -1364,16 +747,6 @@ declare class Transportr {
|
|
|
1364
747
|
* @param options The default {@link RequestOptions} for this instance.
|
|
1365
748
|
*/
|
|
1366
749
|
constructor(url?: URL | string | RequestOptions, options?: RequestOptions);
|
|
1367
|
-
/** HTTP Media Types */
|
|
1368
|
-
static readonly MediaType: typeof HttpMediaType;
|
|
1369
|
-
/** HTTP Request Methods */
|
|
1370
|
-
static readonly RequestMethod: typeof HttpRequestMethod;
|
|
1371
|
-
/** HTTP Request Headers */
|
|
1372
|
-
static readonly RequestHeader: typeof HttpRequestHeader;
|
|
1373
|
-
/** HTTP Response Headers */
|
|
1374
|
-
static readonly ResponseHeader: typeof HttpResponseHeader;
|
|
1375
|
-
/** Request Caching Policy */
|
|
1376
|
-
static readonly CachingPolicy: typeof RequestCachingPolicy;
|
|
1377
750
|
/** Credentials Policy */
|
|
1378
751
|
static readonly CredentialsPolicy: {
|
|
1379
752
|
readonly INCLUDE: "include";
|
|
@@ -1795,5 +1168,5 @@ declare class Transportr {
|
|
|
1795
1168
|
get [Symbol.toStringTag](): string;
|
|
1796
1169
|
}
|
|
1797
1170
|
|
|
1798
|
-
export { HttpError, HttpErrorOptions, HttpMediaType, HttpRequestHeader,
|
|
1171
|
+
export { HttpError, HttpErrorOptions, HttpMediaType, HttpRequestHeader, Json, JsonArray, JsonObject, JsonPrimitive, JsonString, JsonValue, RequestCachingPolicy, RequestEvent, RequestTiming, ResponseBody, ResponseStatus, SignalErrors, SignalEvents, Transportr, XSRF_COOKIE_NAME, XSRF_HEADER_NAME, abortEvent, aborted, defaultMediaType, endsWithSlashRegEx, eventListenerOptions, internalServerError, mediaTypes, requestBodyMethods, retryBackoffFactor, retryDelay, retryMethods, retryStatusCodes, timedOut, timeoutEvent };
|
|
1799
1172
|
export type { AbortConfiguration, AbortEvent, AbortSignalEvent, AfterResponseHook, BeforeErrorHook, BeforeRequestHook, Entries, EventRegistration, HookOptions, NormalizedRetryOptions, PublishOptions, ReadOnlyEntries, RequestBody, RequestBodyMethod, RequestEventHandler, RequestHeaders, RequestLifecycleEvent, RequestMethod, RequestOptions, ResponseHandler, RetryOptions, SearchParameters, TimeoutEvent, TypedArray, TypedResponse, XsrfOptions };
|