Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 638 Bytes

_Client_Post_.md

File metadata and controls

31 lines (18 loc) · 638 Bytes

Client:Post

使用 Post 方法请求某路由

response = client:Post(data)

参数:

  • client [userdata-Client]:客户端数据

  • data [table]:请求数据,结构如下:

    • route [string]:路由,
    • headers [table]:请求头(可选,默认为空或默认请求头)
    • params [string/table]:请求参数(可选,默认为空)
    • type [string]:文档的 MIME Type(可选,默认为 “application/x-www-form-urlencoded”)

返回值:

  • response [table]:响应数据,结构见 附录

示例