nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mnit simple : change the format of dimensions to fix values
[nit.git]
/
lib
/
neo4j
/
curl_json.nit
diff --git
a/lib/neo4j/curl_json.nit
b/lib/neo4j/curl_json.nit
index
77d3650
..
e458eb1
100644
(file)
--- a/
lib/neo4j/curl_json.nit
+++ b/
lib/neo4j/curl_json.nit
@@
-15,7
+15,7
@@
# cURL requests compatible with the JSON REST APIs.
module curl_json
# 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
intrude import curl
# An abstract request that defines most of the standard options for Neo4j REST API
@@
-35,14
+35,14
@@
abstract class JsonCurlRequest
end
# OAuth token
end
# OAuth token
- var auth: nullable String writable
+ var auth: nullable String is writable
# User agent (is used by github to contact devs in case of problems)
# Eg. "Awesome-Octocat-App"
# User agent (is used by github to contact devs in case of problems)
# Eg. "Awesome-Octocat-App"
- var user_agent: nullable String writable
+ var user_agent: nullable String is writable
# HTTP headers to send
# HTTP headers to send
- var headers: nullable HeaderMap writable = null
+ var headers: nullable HeaderMap = null is writable
# init HTTP headers for Neo4j REST API
# init HTTP headers 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 = 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
if auth != null then
headers["Authorization"] = "token {auth.to_s}"
end
@@
-95,7
+96,7
@@
abstract class JsonCurlRequest
end
var err_hook = execute_hook
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
var err_resp = perform
if err_resp != null then return err_resp
@@
-125,7
+126,7
@@
end
class JsonPOST
super JsonCurlRequest
class JsonPOST
super JsonCurlRequest
- var data: nullable Jsonable writable = null
+ var data: nullable Jsonable = null is writable
redef fun init_headers do
super
redef fun init_headers do
super
@@
-160,7
+161,7
@@
end
class JsonPUT
super JsonCurlRequest
class JsonPUT
super JsonCurlRequest
- var data: nullable Jsonable writable = null
+ var data: nullable Jsonable = null is writable
redef fun init_headers do
super
redef fun init_headers do
super