понедельник, 20 апреля 2015 г.

lua, execute и curl - получить код ответа

1)
session:execute("curl", some_url)
Код будет в curl_response_code

2)
local response = api:execute("curl", url .. " json timeout 2 get ")
resp = json.decode(response)

if  resp.status_code ~= 200 then ...

Комментариев нет:

Отправить комментарий