neo4j :: JsonPOST :: defaultinit
neo4j :: JsonPOST :: json_data=
neo4j $ JsonPOST :: execute_hook
Hook to implement in concrete requestscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
curl :: CurlHTTPRequest :: data=
Data for the body of a POST requestcurl :: CurlHTTPRequest :: defaultinit
curl :: CurlRequest :: defaultinit
neo4j :: JsonCurlRequest :: defaultinit
core :: Object :: defaultinit
neo4j :: JsonPOST :: defaultinit
curl :: CurlHTTPRequest :: delegate
Delegates to customize the behavior when runningexecute
curl :: CurlHTTPRequest :: delegate=
Delegates to customize the behavior when runningexecute
curl :: CurlHTTPRequest :: download_to_file
Download to file given resourceneo4j :: JsonCurlRequest :: execute_hook
Hook to implement in concrete requestscurl :: CurlHTTPRequest :: headers=
Header content of the requestneo4j :: JsonCurlRequest :: init_headers
init HTTP headers for Neo4j REST APIcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
neo4j :: JsonPOST :: json_data=
curl :: CurlHTTPRequest :: method=
The HTTP method, GET by defaultcore :: Object :: output_class_name
Display class name on stdout (debug only).curl :: CurlHTTPRequest :: unix_socket_path
Set the Unix domain socket path to usecurl :: CurlHTTPRequest :: unix_socket_path=
Set the Unix domain socket path to usecurl :: CurlHTTPRequest :: url=
Address of the remote resource to requestcurl :: CurlHTTPRequest :: user_agent
Set the user agent for all following HTTP requestscurl :: CurlHTTPRequest :: user_agent=
Set the user agent for all following HTTP requests
# HTTP POST command that sends JSON data
class JsonPOST
super JsonCurlRequest
var json_data: nullable Serializable = null is writable
redef fun init_headers do
super
headers["Content-Type"] = "application/json"
end
redef fun execute_hook do
var err = self.curl.native.easy_setopt(new CURLOption.post, true)
if not err.is_ok then return answer_failure(err.to_i, err.to_s)
if self.json_data != null then
var postdatas = self.json_data.to_json
err = self.curl.native.easy_setopt(new CURLOption.postfields, postdatas)
if not err.is_ok then return answer_failure(err.to_i, err.to_s)
end
return null
end
end
lib/neo4j/curl_json.nit:106,1--128,3