curl :: CurlHTTPRequest :: set_body
# Set request's body
private fun set_body : CURLCode
do
var err
var data = self.data
var body = self.body
if data != null then
var postdatas = data.to_url_encoded(self.curl)
err = self.curl.native.easy_setopt(new CURLOption.postfields, postdatas)
if not err.is_ok then return err
else if body != null then
err = self.curl.native.easy_setopt(new CURLOption.postfields, body)
if not err.is_ok then return err
end
return new CURLCode.ok
end
lib/curl/curl.nit:205,2--221,4