local ltn12 = require "luci.ltn12"
local util = require "luci.util"
local table = require "table"
-local http = require "luci.http.protocol"
+local http = require "luci.http"
local date = require "luci.http.protocol.date"
local type, pairs, ipairs, tonumber = type, pairs, ipairs, tonumber
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]*)(.*)")