nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: intro `Float.lerp` for simple linear interpolation
[nit.git]
/
tests
/
test_curl.nit
diff --git
a/tests/test_curl.nit
b/tests/test_curl.nit
index
6401706
..
79cdb5b
100644
(file)
--- a/
tests/test_curl.nit
+++ b/
tests/test_curl.nit
@@
-18,6
+18,12
@@
module test_curl
import curl
import curl
+class CallbackManager
+ super CurlCallbacks
+
+ redef fun body_callback(line: String) do end
+end
+
fun error_manager(err: CURLCode) do if not err.is_ok then print err
var url = "http://example.org/"
fun error_manager(err: CURLCode) do if not err.is_ok then print err
var url = "http://example.org/"
@@
-33,6
+39,10
@@
error_manager(error)
#error = curl.easy_setopt(new CURLOption.verbose, 1)
#error_manager(error)
#error = curl.easy_setopt(new CURLOption.verbose, 1)
#error_manager(error)
+var cbManager = new CallbackManager
+error = curl.register_callback(cbManager, new CURLCallbackType.body)
+error_manager(error)
+
error = curl.easy_perform
error_manager(error)
error = curl.easy_perform
error_manager(error)