93 Commits

Author SHA1 Message Date
Alexey Melnichuk
a0a0cac631 Use hererocks on Travis. 2016-04-07 17:21:29 +03:00
Alexey Melnichuk
a038558b44 Fix. call all callback from coroutine where perform was called. 2016-04-07 16:59:50 +03:00
Alexey Melnichuk
7eeaeb3ce6 Fix. Skip pause test because it can behave differently on different OS/cURL version. 2015-06-15 11:46:00 +04:00
Alexey Melnichuk
0ba125dfc3 Fix. cURLv3 info_read return correct object. 2014-12-22 13:13:24 +04:00
Alexey Melnichuk
b90485619d Add. easy/multi handle support user values.
```Lua
  f = io.open(...)
  e = curl.easy():setdata(f)
  ...
  -- when easy done
  e:getdata():close()
```
2014-12-22 12:43:55 +04:00
Alexey Melnichuk
15f4b2d53a Fix. Supports Lua 5.3.beta 2014-11-26 13:58:56 +04:00
Alexey Melnichuk
764b071989 Change. cURL wrapper store proxy functions in class not in object.
Fix. Test for stream reader.
2014-09-19 11:25:34 +05:00
Alexey Melnichuk
3178580a08 Fix. Ignore unknown tables in form:add().
Fix. Check type for `headers` field.
Add. Supports `content` field in form:add().
2014-09-17 12:14:47 +05:00
Alexey Melnichuk
5fdc34a47d Add. Use LuaCov 2014-09-16 14:00:54 +05:00
Alexey Melnichuk
ba7aedebcb Add. Ability to add easy handle during iteration. 2014-09-15 15:03:27 +05:00
Alexey Melnichuk
aff3042434 Change. Returns nothing form reader callback means EOF.
Change. multi:iperform() remove easy handle when it done.
2014-09-15 13:17:13 +05:00
Alexey Melnichuk
e6c2ffce5c Add. test to set/unset postfields 2014-09-15 10:57:33 +05:00
Alexey Melnichuk
9127efffc2 Speedup test. 2014-09-10 13:21:28 +05:00
Alexey Melnichuk
a6511ba7d0 Add. Test compatibility safe and unsafe objects 2014-09-09 11:43:31 +05:00
Alexey Melnichuk
ab815645ed Add. Note about test fail. [ci skip] 2014-09-08 13:28:47 +04:00
Alexey Melnichuk
b575ca74c9 Revert "Change. Use httpbin.org to test"
This reverts commit 52834c0e019a636be0fac9c4589925b5b53cd293.
2014-09-08 13:09:50 +04:00
Alexey Melnichuk
52834c0e01 Change. Use httpbin.org to test 2014-09-08 13:09:08 +04:00
Alexey Melnichuk
f2ab8ee8a6 Fix. Return nil from read callback means EOF. 2014-09-08 10:45:52 +05:00
Alexey Melnichuk
c79e255662 Update test 2014-09-08 10:22:04 +05:00
Alexey Melnichuk
3fba1d6b61 Update test 2014-09-07 16:08:25 +04:00
Alexey Melnichuk
1062805482 Fix. read callback hangup if it returns wrong value 2014-09-07 13:54:54 +04:00
Alexey Melnichuk
05272ea096 Fix. Easy cleanup unref wrong reference
Fix. Read buffer use size_t as offset
Change. Use httpbin.org as test server

```Lua
-- Test case for easy:close()
form = curl.form()
e = curl.easy{httpheader = {}}
e:close()
form:free()
```
2014-09-07 11:21:54 +04:00
Alexey Melnichuk
e30104bc44 Fix. Progress function should return 1 to continue. 2014-09-05 16:18:36 +05:00
Alexey Melnichuk
5cf2f412af Add. pause examples. 2014-09-05 13:15:59 +05:00
Alexey Melnichuk
4a0fbd4095 Add. easy:pause() method 2014-09-05 11:29:08 +05:00
Alexey Melnichuk
6453a60c4a Update test 2014-09-04 18:16:33 +05:00
Alexey Melnichuk
8f4a0980ca Fix. Returns nil from write callback treat as write error. 2014-09-04 18:11:03 +05:00
Alexey Melnichuk
3d34167f92 Update test 2014-09-04 16:00:34 +05:00
Alexey Melnichuk
e8c76b223b Update test 2014-09-04 15:36:32 +05:00
Alexey Melnichuk
08dd077511 Update test. 2014-09-04 15:15:31 +05:00
Alexey Melnichuk
042a7f4a60 Fix. filename and type arguments in form:add_stream may be nil. 2014-09-04 15:03:11 +05:00
Alexey Melnichuk
2dc0cf7fb0 Fix. type argument in form:add_buffer may be nil.
Add. Form tests.
2014-09-04 14:46:10 +05:00
Alexey Melnichuk
db7e541e09 Fix. Remove values from storage on unset.
Fix. Set callback with context.
2014-09-03 11:16:10 +05:00
Alexey Melnichuk
cf3c9900c0 Fix. Set readfunction for easy object. 2014-09-02 16:21:07 +05:00
Alexey Melnichuk
21106ca7bd Fix. Reset options will also reset value in storage.
```Lua
-- Fixed
e:setopt_httppost(curl.form())
e:setopt_httppost(curl.form())
-- `e` store 2 form object and the will alive until `e` is alive.
```
2014-09-01 16:19:51 +05:00
Alexey Melnichuk
ee905b4209 Add. easy escape test. 2014-09-01 15:34:42 +05:00
Alexey Melnichuk
7aa70f9a59 Change. Write callback can return any true value (except numbers).
For example in Lua 5.2 file:write method returns `self`.

``` Lua
function write(str)
  return #str - 1 -- this is error (number less than #str)
end

function write(str)
  return {} -- this is pass
end
```
2014-09-01 14:53:25 +05:00
Alexey Melnichuk
f7d21361d2 Change. Easy/Share/Multi allow set multiple options at once. 2014-09-01 14:20:07 +05:00
Alexey Melnichuk
144ceeb123 Change. Easy ctor and setopt method could use table to set multiple options.
```Lua
c = curl.easy{
  url = 'http://example.com',
  [curl.OPT_VERBOSE] = true,
}
```
2014-09-01 13:38:34 +05:00
Alexey Melnichuk
ef25a2f444 Add. category method to error object. 2014-09-01 11:39:11 +05:00
Alexey Melnichuk
de4e4ccb30 Fix. Echo libcurl version in test. 2014-08-26 13:53:45 +05:00
Alexey Melnichuk
93d9142cf6 Fix. Support libcurl >= 7.25 2014-08-26 13:28:34 +05:00
Alexey Melnichuk
ea7a282218 Add. Travis files 2014-08-26 12:40:18 +05:00