Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua_http.request uploadContent无法提交数据 #18

Open
d1bug opened this issue Apr 12, 2020 · 1 comment
Open

lua_http.request uploadContent无法提交数据 #18

d1bug opened this issue Apr 12, 2020 · 1 comment

Comments

@d1bug
Copy link

d1bug commented Apr 12, 2020

无论我怎么改变uploadContent的内容,后台始终无法收到内容

laoxie.ajax = function (params,callback)
params = params or {}
local headers= {
["Content-Type"] = "application/x-www-form-urlencoded",
}
lua_http.request({
url = params.url,
isPost=true,
uploadContent=params.param,
headers=headers,
--body=params.param,
onResponse = function (response)
if response.http_code ~= 200 then
if callback then
callback(nil)
end
else
if callback then
callback(response.response)
end
end
end}
)
end

@d1bug
Copy link
Author

d1bug commented Apr 12, 2020

用headers传参没问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant