函数:httpPost 提交网页数据

函数名称:提交网页数据

函数功能:以 post 方式提交数据获取网页返回信息

函数方法

str = httpPost(url,data,options)

必填

参数 类型 说明
url string 访问的网页地址 URL
data string 要提交的 Post 参数数据

选填

参数 类型 说明
options table 操作参数

options 参数介绍

必填

参数 类型 说明
tstab number 是

选填

参数 类型 说明
timeOut number 超时时间,不写默认为 5 秒
urlEnCode boolean 是否对 URL 进行编码。默认 false
false - 不进行编码,true - 进行编码

返回值

返回值 类型 说明
str string/boolean 成功返回网页内容,失败返回 false

函数用例

webdata =  httpPost("http://www.baidu.com/")--获取百度首页网页数据
if  webdata and webdata ~= "" then
-- dialog 仅支持安卓设备并且需要切换到触动智控输入法
dialog(webdata)
end
Copyright 北京帮你玩科技有限公司 2024 all right reserved,powered by Gitbook该文章修订时间: 2025-03-04 15:43:41

results matching ""

    No results matching ""