forked from capricorn86/happy-dom
/
IRequest.ts
62 lines (58 loc) · 1.39 KB
/
IRequest.ts
1
2
3
4
5
6
7
8
9
10
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import IHeaders from './IHeaders';
import IBody from './IBody';
import URL from './../location/URL';
export type RequestInfo = IRequest | string | URL;
/**
* Fetch request.
*/
export default interface IRequest extends IBody {
readonly headers: IHeaders;
readonly method: string;
readonly redirect: 'error' | 'follow' | 'manual';
readonly referrer: string;
readonly url: string;
/**
* Returns a clone.
*
* @returns Clone.
*/
clone(): IRequest;
// Not implemented:
// Readonly cache: 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
// Readonly credentials: 'include' | 'omit' | 'same-origin';
// Readonly destination:
// | ''
// | 'object'
// | 'audio'
// | 'audioworklet'
// | 'document'
// | 'embed'
// | 'font'
// | 'frame'
// | 'iframe'
// | 'image'
// | 'manifest'
// | 'paintworklet'
// | 'report'
// | 'script'
// | 'sharedworker'
// | 'style'
// | 'track'
// | 'video'
// | 'worker'
// | 'xslt';
// Readonly referrerPolicy:
// | ''
// | 'same-origin'
// | 'no-referrer'
// | 'no-referrer-when-downgrade'
// | 'origin'
// | 'origin-when-cross-origin'
// | 'strict-origin'
// | 'strict-origin-when-cross-origin'
// | 'unsafe-url';
// Readonly signal: AbortSignal;
// Readonly integrity: string;
// Readonly keepalive: boolean;
// Readonly mode: 'same-origin' | 'cors' | 'navigate' | 'no-cors';
}