Use single quotes in curl command line
This commit is contained in:
parent
6433e6f14e
commit
eb2f1410c8
1 changed files with 3 additions and 3 deletions
6
c4mate
6
c4mate
|
@ -52,14 +52,14 @@ function MatePad:fetch(api, data)
|
||||||
if data ~= nil then
|
if data ~= nil then
|
||||||
local flags = ""
|
local flags = ""
|
||||||
for k, v in pairs(data) do
|
for k, v in pairs(data) do
|
||||||
flags = string.format("%s --data-urlencode \"%s=%s\"", flags, k, v)
|
flags = string.format("%s --data-urlencode '%s=%s'", flags, k, v)
|
||||||
end
|
end
|
||||||
curl = io.popen(string.format(
|
curl = io.popen(string.format(
|
||||||
"curl %s --cookie \"%s\" --cookie-jar \"%s\" %s \"%s/%s\"",
|
"curl %s --cookie '%s' --cookie-jar '%s' %s '%s/%s'",
|
||||||
self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, flags, self.HOST, api))
|
self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, flags, self.HOST, api))
|
||||||
else
|
else
|
||||||
curl = io.popen(string.format(
|
curl = io.popen(string.format(
|
||||||
"curl %s --cookie \"%s\" --cookie-jar \"%s\" \"%s/%s\"",
|
"curl %s --cookie '%s' --cookie-jar '%s' '%s/%s'",
|
||||||
self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, self.HOST, api))
|
self.CURL_FLAGS, self.COOKIE_JAR, self.COOKIE_JAR, self.HOST, api))
|
||||||
end
|
end
|
||||||
responce = curl:read("a")
|
responce = curl:read("a")
|
||||||
|
|
Loading…
Reference in a new issue