projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6d4f32
)
add params support in options
306/head
author
Yuzo
<hyzgog@gmail.com>
Thu, 22 Jan 2015 05:12:48 +0000
(13:12 +0800)
committer
Yuzo
<hyzgog@gmail.com>
Thu, 22 Jan 2015 05:12:48 +0000
(13:12 +0800)
libs/luci-lib-httpclient/luasrc/httpclient.lua
patch
|
blob
|
history
diff --git
a/libs/luci-lib-httpclient/luasrc/httpclient.lua
b/libs/luci-lib-httpclient/luasrc/httpclient.lua
index af79695244088c9e457b89768f92a943613fb609..c76cc542ed9be19515a2ed5f2d53172206fdeba9 100644
(file)
--- a/
libs/luci-lib-httpclient/luasrc/httpclient.lua
+++ b/
libs/luci-lib-httpclient/luasrc/httpclient.lua
@@
-97,7
+97,11
@@
end
function request_raw(uri, options)
options = options or {}
local pr, auth, host, port, path
-
+
+ if options.params then
+ uri = uri .. '?' .. http.urlencode_params(options.params)
+ end
+
if uri:find("%[") then
if uri:find("@") then
pr, auth, host, port, path = uri:match("(%w+)://(.+)@(%b[]):?([0-9]*)(.*)")