Commit Graph

6 Commits

Author SHA1 Message Date
Jacek Jendrzej
35898bb7fd add postfields and header curl option 2016-03-25 20:20:48 +01:00
M. Liebmann
31f2f1275a CLuaInstance: Fixes occasional problems when exiting the movie player
Reduces debug output in curl
2015-12-25 07:51:09 +01:00
M. Liebmann
9e331ee4e3 CLuaInstance: Fix and unified script function calls
- No api changes, code only
2015-12-23 08:29:15 +01:00
M. Liebmann
6b6dff36d6 CLuaInstCurl: Fix compiler warning 2015-12-22 13:14:18 +01:00
M. Liebmann
c5bcbf490c CLuaInstCurl::CurlDownload: Rework progress display
- Set Lua api version to 1.31
2015-12-15 00:34:13 +01:00
M. Liebmann
4f9158c2a9 CLuaInstance: Add class for using libcurl
- Add simple download function
 - Set Lua api version to 1.24

	parameter	typ		default
	----------------------------------------
	url		string		required
	o, outputfile	string		when empty then save to string
					as secund return value
	A, userAgent	string		empty
	v, verbose	bool		false
	s, silent	bool		false
	connectTimeout	number		20
	ipv4		bool		false
	ipv6		bool		false
	useProxy	bool		true (default)
	followRedir	bool		true
	maxRedirs	number		20

Example:
	-- simplest program call:
	-- ----------------------
	local curl = curl.new()
	local ret, data = curl:download{url="http://example.com", o="/tmp/test.txt"}
	if ret ~= CURL.OK then
		print("Error: " .. data)
	end

	-- or --

	local curl = curl.new()
	local ret, data = curl:download{url="http://example.com"}
	if ret == CURL.OK then
		-- downloaded data
		print(data)
		..
	else
		print("Error: " .. data)
	end
2015-12-13 23:36:52 +01:00