lib/curl: remove useless types
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 21 May 2015 21:25:41 +0000 (17:25 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 28 May 2015 13:56:09 +0000 (09:56 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/curl/curl.nit
lib/curl/examples/curl_http.nit

index c087642..dbfc157 100644 (file)
@@ -377,8 +377,7 @@ class CurlResponseSuccess
        var status_code = 0
 
        # Receive body from request due to body callback registering
-       redef fun body_callback(line: String)
-       do
+       redef fun body_callback(line) do
                self.body_str = "{self.body_str}{line}"
        end
 end
index 079f12c..948ba38 100644 (file)
@@ -32,16 +32,16 @@ class MyHttpFetcher
        fun destroy do self.curl.destroy
 
        # Header callback
-       redef fun header_callback(line: String) do
+       redef fun header_callback(line) do
                # We keep this callback silent for testing purposes
                #if not line.has_prefix("Date:") then print "Header_callback : {line}"
        end
 
        # Body callback
-       redef fun body_callback(line: String) do self.our_body = "{self.our_body}{line}"
+       redef fun body_callback(line) do self.our_body = "{self.our_body}{line}"
 
        # Stream callback - Cf : No one is registered
-       redef fun stream_callback(buffer: String, size: Int, count: Int) do print "Stream_callback : {buffer} - {size} - {count}"
+       redef fun stream_callback(buffer, size, count) do print "Stream_callback : {buffer} - {size} - {count}"
 end