Skip to content

Commit 19609de

Browse files
popstarfreasTheSpyder
authored andcommitted
feat: Add get methods for Https module
(cherry picked from commit 4bc3cb1c81d674cebd38f30de9dda81a925f1f22)
1 parent eb75788 commit 19609de

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Https.res

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,15 @@ module Agent = {
3030
}
3131
include Events
3232
}
33+
34+
@module("https") external get: string => Http.ClientRequest.t = "get"
35+
@module("https")
36+
external getWithCallback: (string, Http.IncomingMessage.t => unit) => Http.ClientRequest.t = "get"
37+
@module("https")
38+
external getWithOptions: (string, Http.requestOptions) => Http.ClientRequest.t = "get"
39+
@module("https")
40+
external getWithOptionsCallback: (
41+
string,
42+
Http.requestOptions,
43+
Http.IncomingMessage.t => unit,
44+
) => Http.ClientRequest.t = "get"

0 commit comments

Comments
 (0)