liquid_feedback_frontend
annotate env/net/curl.lua @ 289:6f79a181a921
Changed colors for interest/support
| author | bsw |
|---|---|
| date | Sat Feb 25 12:43:10 2012 +0100 (2012-02-25) |
| parents | c587d8762e62 |
| children | f49cdfb72567 |
| rev | line source |
|---|---|
| bsw@286 | 1 function net.curl(url) |
| bsw@286 | 2 local stdout, errmsg, status = os.pfilter(nil, "curl", url) |
| bsw@286 | 3 if not stdout then |
| bsw@286 | 4 error("Error while executing curl: " .. errmsg) |
| bsw@286 | 5 end |
| bsw@286 | 6 if status ~= 0 then |
| bsw@286 | 7 return nil |
| bsw@286 | 8 end |
| bsw@286 | 9 return stdout |
| bsw@286 | 10 end |