neo4j :: JsonCurlRequest :: execute_hook
# Hook to implement in concrete requests
protected fun execute_hook: nullable CurlResponse do return null
lib/neo4j/curl_json.nit:91,2--92,65
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
lib/neo4j/curl_json.nit:117,2--127,4
redef fun execute_hook do
var err = self.curl.native.easy_setopt(new CURLOption.custom_request, "DELETE")
if not err.is_ok then return answer_failure(err.to_i, err.to_s)
return null
end
lib/neo4j/curl_json.nit:134,2--138,4
redef fun execute_hook do
var err = self.curl.native.easy_setopt(new CURLOption.custom_request, "PUT")
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
lib/neo4j/curl_json.nit:152,2--162,4