aboutsummaryrefslogtreecommitdiff
path: root/types/ssl/https.d.tl
blob: 94c38df682d56f55851ef77ee1d4daa0b3c6e55d (plain)
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
local ssl = require("ssl")
local SSLCertificate = ssl.SSLCertificate
local SSLConnection = ssl.SSLConnection

local ltn12 = require("ltn12")
local Pump = ltn12.Pump
local Sink = ltn12.Sink
local Source = ltn12.Source

local record https
   record HTTPSRequest
      -- HTTP options
      url: string|{string}
      sink: Sink<string>
      method: string
      headers: {string:string}
      source: Source<string>
      step: Pump<string>
      -- proxy: string -- not supported
      -- redirect: boolean -- not supported
      -- create: function -- https implements its own

      -- SSL options
      mode: string
      protocol: string
      key: string
      password: string|function
      certificate: string
      certificates: {SSLCertificate}
      cafile: string
      capath: string
      verify: string|{string}
      options: string|{string}
      ciphers: string
      ciphersuites: string
      depth: number
      dhparam: function
      curve: string
      curves_list: string
      verifyext: string|{string}
      alpn: string|function|{string}
      dane: boolean
   end
   request: function(string): string, number, {string:string}, string
   request: function(string, string): string, number, {string:string}, string
   request: function(HTTPSRequest): string, number, {string:string}, string
   tcp: function(): function(): SSLConnection
end

return https