benches/strings: add .gitignore and `make clean`
[nit.git] / lib / neo4j / curl_json.nit
index f1a1da8..e458eb1 100644 (file)
@@ -15,7 +15,7 @@
 # cURL requests compatible with the JSON REST APIs.
 module curl_json
 
-import jsonable
+import json::static
 intrude import curl
 
 # An abstract request that defines most of the standard options for Neo4j REST API
@@ -50,6 +50,7 @@ abstract class JsonCurlRequest
                headers = new HeaderMap
                headers["Accept"] = "application/json; charset=UTF-8"
                headers["Transfer-Encoding"] = "chunked"
+               headers["X-Stream"] = "true"
                if auth != null then
                        headers["Authorization"] = "token {auth.to_s}"
                end
@@ -95,7 +96,7 @@ abstract class JsonCurlRequest
                end
 
                var err_hook = execute_hook
-           if err_hook != null then return err_hook
+               if err_hook != null then return err_hook
 
                var err_resp = perform
                if err_resp != null then return err_resp