diff --git a/lib/Curl.toffee b/lib/Curl.toffee index 3fc45ed..246975f 100644 --- a/lib/Curl.toffee +++ b/lib/Curl.toffee @@ -39,13 +39,17 @@ Curl.user_options = RAW: 'RAW' DEBUG: 'DEBUG' +# on 'data' must be returns the chunk length Curl::on = (event, callback) -> switch event when 'data' + # (Buffer chunk) -> @on_write = callback when 'error' + # (Error error) -> @on_error = callback when 'end' + # () -> @on_end = callback else throw new Error("invalid event type #{event}")