Add a note to the rest api.
Added by Oskar Calvo over 8 years ago
Hello, I'm building a small app over redmine.
I'm with the issues, and I'm able to update all the fields but the note is not updated, it's the only one that is not changed.
This is the params that I get from the form:
{"project_id"=>"9",
"subjetc"=>"Tarea número uno",
"tracker_id"=>"3",
"status_id"=>"1",
"priority_id"=>"3",
"assigned_to_id"=>"6",
"start_date"=>"2016-07-07",
"due_date"=>"",
"id"=>"102",
"notes"=>"Esto es una nota fija para ver si se generan"}
this is the method I use to make a put:
def put (path, args = {})
uri = URI.parse(path)
req = Net::HTTP::Put.new(uri, 'Content-Type' => 'application/json' )
req.body = args.to_json
if args[:user] && args[:pass]
req.basic_auth args[:user], args[:pass]
end
#binding.pry
res = Net::HTTP.start(uri.hostname, uri.port) {|http| response = http.request(req) }
end
Any idea what's going on?
Thanks.
Oskar
Replies (1)
RE: Add a note to the rest api. - Added by Oskar Calvo over 8 years ago
Sorry people, I'm checking the issue 103 instead the 102 :embarrassing:
Oskar