
--------------------------------------------------------------------------------
-- HTTPS module
--------------------------------------------------------------------------------

---@type socket*
local socket = require("socket")

---@type ssl*
local ssl = require("ssl")

---@type ltn12*
local ltn12 = require("ltn12")

---@type socket_http*
local http = require("socket.http")

---@type socket_url*
local url = require("socket.url")

---@class ssl_https*
---@field PORT integer Default port
---@field TIMEOUT number Default timeout
---@field _VERSION string version
---@type ssl_https*
local M = {}

M.PORT = 443
M.TIMEOUT = nil

--- Make an HTTPS request
---@param urlOrRequest string|table URL or request form
---@param body? string Request body
---@return string|integer|nil bodyOrOk Response body or LTN12 status
---@return integer|string? statusCodeOrErr status code or error message
---@return table? headers response header
---@return string? statusLine status line
function M.request(urlOrRequest, body) end

--- Create an HTTPS TCP factory
---@param params table parameters
---@return function create Create function
function M.tcp(params) end

return M
