Skip to content

Commit d3c09a6

Browse files
committed
formatting
1 parent 2a66678 commit d3c09a6

File tree

1 file changed

+68
-36
lines changed

1 file changed

+68
-36
lines changed

src/Http.re

Lines changed: 68 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,93 @@
11
type http = [ | `Http];
22

3-
type headers = pri {
3+
type headers =
4+
pri {
45
accept: option(string),
5-
[@bs.as "accept-language"] acceptLanguage: option(string),
6-
[@bs.as "accept-patch"] acceptPatch: option(string),
7-
[@bs.as "accept-ranges"] acceptRanges: option(string),
8-
[@bs.as "access-control-allow-credentials"] accessControlAllowCredentials: option(string),
9-
[@bs.as "access-control-allow-headers"] accessControlAllowHeaders: option(string),
10-
[@bs.as "access-control-allow-methods"] accessControlAllowMethods: (string),
11-
[@bs.as "access-control-allow-origin"] accessControlAllowOrigin: option(string),
12-
[@bs.as "access-control-expose-headers"] accessControlExposeHeaders: option(string),
13-
[@bs.as "access-control-max-age"] accessControlMaxAge: option(string),
6+
[@bs.as "accept-language"]
7+
acceptLanguage: option(string),
8+
[@bs.as "accept-patch"]
9+
acceptPatch: option(string),
10+
[@bs.as "accept-ranges"]
11+
acceptRanges: option(string),
12+
[@bs.as "access-control-allow-credentials"]
13+
accessControlAllowCredentials: option(string),
14+
[@bs.as "access-control-allow-headers"]
15+
accessControlAllowHeaders: option(string),
16+
[@bs.as "access-control-allow-methods"]
17+
accessControlAllowMethods: string,
18+
[@bs.as "access-control-allow-origin"]
19+
accessControlAllowOrigin: option(string),
20+
[@bs.as "access-control-expose-headers"]
21+
accessControlExposeHeaders: option(string),
22+
[@bs.as "access-control-max-age"]
23+
accessControlMaxAge: option(string),
1424
age: option(string),
1525
allow: option(string),
16-
[@bs.as "alt-svc"] altSvc: option(string),
26+
[@bs.as "alt-svc"]
27+
altSvc: option(string),
1728
authorization: option(string),
18-
[@bs.as "cache-control"] cacheControl: option(string),
29+
[@bs.as "cache-control"]
30+
cacheControl: option(string),
1931
connection: option(string),
20-
[@bs.as "content-disposition"] contentDisposition: option(string),
21-
[@bs.as "content-encoding"] contentEncoding: option(string),
22-
[@bs.as "content-language"] contentLanguage: option(string),
23-
[@bs.as "content-length"] contentLenth: option(string),
24-
[@bs.as "content-location"] contentLocation: option(string),
25-
[@bs.as "content-range"] contentRange: option(string),
26-
[@bs.as "content-type"] contentType: option(string),
32+
[@bs.as "content-disposition"]
33+
contentDisposition: option(string),
34+
[@bs.as "content-encoding"]
35+
contentEncoding: option(string),
36+
[@bs.as "content-language"]
37+
contentLanguage: option(string),
38+
[@bs.as "content-length"]
39+
contentLenth: option(string),
40+
[@bs.as "content-location"]
41+
contentLocation: option(string),
42+
[@bs.as "content-range"]
43+
contentRange: option(string),
44+
[@bs.as "content-type"]
45+
contentType: option(string),
2746
cookie: option(string),
2847
date: option(string),
2948
expect: option(string),
3049
expires: option(string),
3150
forwarded: option(string),
3251
from: option(string),
3352
host: option(string),
34-
[@bs.as "if-match"] ifMatch: option(string),
35-
[@bs.as "if-modified-since"] ifModifiedSince: option(string),
36-
[@bs.as "if-none-match"] ifNoneMatch: option(string),
37-
[@bs.as "if-unmodified-since"] ifUnmodifiedSince: option(string),
38-
[@bs.as "last-modified"] lastModified: option(string),
53+
[@bs.as "if-match"]
54+
ifMatch: option(string),
55+
[@bs.as "if-modified-since"]
56+
ifModifiedSince: option(string),
57+
[@bs.as "if-none-match"]
58+
ifNoneMatch: option(string),
59+
[@bs.as "if-unmodified-since"]
60+
ifUnmodifiedSince: option(string),
61+
[@bs.as "last-modified"]
62+
lastModified: option(string),
3963
location: option(string),
4064
pragma: option(string),
41-
[@bs.as "proxy-authenticate"] proxyAuthenticate: option(string),
42-
[@bs.as "proxy-authorization"] proxyAuthorization: option(string),
43-
[@bs.as "public-key-pins"] publicKeyPins: option(string),
65+
[@bs.as "proxy-authenticate"]
66+
proxyAuthenticate: option(string),
67+
[@bs.as "proxy-authorization"]
68+
proxyAuthorization: option(string),
69+
[@bs.as "public-key-pins"]
70+
publicKeyPins: option(string),
4471
range: option(string),
4572
referer: option(string),
46-
[@bs.as "retry-after"] retryAfter: option(string),
47-
[@bs.as "set-cookie"] setCookie: option(array(string)),
48-
[@bs.as "strict-transport-security"] strictTransportPolicy: option(string),
73+
[@bs.as "retry-after"]
74+
retryAfter: option(string),
75+
[@bs.as "set-cookie"]
76+
setCookie: option(array(string)),
77+
[@bs.as "strict-transport-security"]
78+
strictTransportPolicy: option(string),
4979
tk: option(string),
5080
trailer: option(string),
51-
[@bs.as "transfer-encoding"] transferEncoding: option(string),
81+
[@bs.as "transfer-encoding"]
82+
transferEncoding: option(string),
5283
upgrade: option(string),
53-
[@bs.as "user-agent"] userAgent: option(string),
84+
[@bs.as "user-agent"]
85+
userAgent: option(string),
5486
vary: option(string),
5587
via: option(string),
5688
warning: option(string),
57-
[@bs.as "www-authenticate"] wwwAuthenticate: option(string),
89+
[@bs.as "www-authenticate"]
90+
wwwAuthenticate: option(string),
5891
};
5992

6093
module IncomingMessage = {
@@ -125,8 +158,7 @@ module IncomingMessage = {
125158
[@bs.get] external method_: subtype('w, 'r, 'a) => string = "method";
126159
[@bs.get] external url: subtype('w, 'r, 'a) => string = "url";
127160
[@bs.get] external port: subtype('w, 'r, 'a) => int = "port";
128-
[@bs.get]
129-
external headers: subtype('w, 'r, 'a) => headers = "headers";
161+
[@bs.get] external headers: subtype('w, 'r, 'a) => headers = "headers";
130162
[@bs.get]
131163
external rawHeaders: subtype('w, 'r, 'a) => array(string) = "rawHeaders";
132164
[@bs.get]
@@ -172,7 +204,7 @@ module ClientRequest = {
172204
httpVersionMinor: int,
173205
statusCode: int,
174206
statusMessage: string,
175-
headers: headers,
207+
headers,
176208
rawHeaders: array(string),
177209
};
178210
module Events = {

0 commit comments

Comments
 (0)