forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.res
More file actions
56 lines (47 loc) · 1.35 KB
/
Request.res
File metadata and controls
56 lines (47 loc) · 1.35 KB
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
open FetchAPI
open FileAPI
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request)
*/
@new
external make: (~input: request, ~init: requestInit=?) => request = "Request"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request)
*/
@new
external make2: (~input: string, ~init: requestInit=?) => request = "Request"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer)
*/
@send
external arrayBuffer: request => promise<ArrayBuffer.t> = "arrayBuffer"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/blob)
*/
@send
external blob: request => promise<blob> = "blob"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/bytes)
*/
@send
external bytes: request => promise<array<int>> = "bytes"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/formData)
*/
@send
external formData: request => promise<formData> = "formData"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/json)
*/
@send
external json: request => promise<JSON.t> = "json"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/text)
*/
@send
external text: request => promise<string> = "text"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Request/clone)
*/
@send
external clone: request => request = "clone"