
--------------------------------------------------------------------------------
-- HTTPS 模块
--------------------------------------------------------------------------------

---@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 https*
---@field PORT integer 默认端口
---@field TIMEOUT number 默认超时
---@field _VERSION string 版本
---@type https*
local M = {}

M.PORT = 443
M.TIMEOUT = nil

--- 发起 HTTPS 请求
---@param urlOrRequest string|table URL 或请求表
---@param body? string 请求体
---@return string|integer|nil bodyOrOk 响应体或 LTN12 状态
---@return integer|string? statusCodeOrErr 状态码或错误信息
---@return table? headers 响应头
---@return string? statusLine 状态行
function M.request(urlOrRequest, body) end

--- 创建 HTTPS TCP 工厂
---@param params table 参数
---@return function create 创建函数
function M.tcp(params) end

return M
