Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/curl/curl.nit
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ class CurlHTTPRequest

if data != null then
var postdatas = data.to_url_encoded(self.curl)
err = self.curl.native.easy_setopt(new CURLOption.postfields, postdatas)
err = self.curl.native.easy_setopt(new CURLOption.copypostfields, postdatas)
if not err.is_ok then return err
else if body != null then
err = self.curl.native.easy_setopt(new CURLOption.postfields, body)
err = self.curl.native.easy_setopt(new CURLOption.copypostfields, body)
if not err.is_ok then return err
end
return new CURLCode.ok
Expand Down
6 changes: 4 additions & 2 deletions lib/curl/native_curl.nit
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,14 @@ extern class CURLOption `{ CURLoption `}
# Issue a HTTP POS request.
new post `{ return CURLOPT_POST; `}

# Send a POST with this data.
# Send a POST with this data, which must remain valid until the transfer completes.
new postfields `{ return CURLOPT_POSTFIELDS; `}

# Send a POST with a copy of this data.
new copypostfields `{ return CURLOPT_COPYPOSTFIELDS; `}

# new `{ return CURLOPT_POSTFIELDSIZE; `}
# new `{ return CURLOPT_POSTFIELDSIZE_LARGE; `}
# new `{ return CURLOPT_COPYPOSTFIELDS; `}
# new `{ return CURLOPT_HTTPPOST; `}
# new `{ return CURLOPT_REFERER; `}

Expand Down
4 changes: 2 additions & 2 deletions lib/neo4j/curl_json.nit
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class JsonPOST

if self.json_data != null then
var postdatas = self.json_data.to_json
err = self.curl.native.easy_setopt(new CURLOption.postfields, postdatas)
err = self.curl.native.easy_setopt(new CURLOption.copypostfields, postdatas)
if not err.is_ok then return answer_failure(err.to_i, err.to_s)
end
return null
Expand Down Expand Up @@ -155,7 +155,7 @@ class JsonPUT

if self.json_data != null then
var postdatas = self.json_data.to_json
err = self.curl.native.easy_setopt(new CURLOption.postfields, postdatas)
err = self.curl.native.easy_setopt(new CURLOption.copypostfields, postdatas)
if not err.is_ok then return answer_failure(err.to_i, err.to_s)
end
return null
Expand Down
Loading