Project

General

Profile

getting blank response for trying to update an issue

Added by vishnu siddareddy over 11 years ago

Hi,

I am creating mobile app for Redmine. I am able to get all issues and projects list but i am getting problems while updating an issue. i.e, getting blank XML response.

Also i am getting "status code=200".
Here is my code:
----------------
var xhr = createRequestObject();
xhr.onreadystatechange = function() {
alert(xhr.readyState+"&&"+ xhr.status)
if (xhr.readyState 4){
if(xhr.status 200) {
alert(xhr.responseXML);
}
}
}

var ticketData = '<?xml version="1.0" encoding="UTF-8"?>';
ticketData += '&lt;issue&gt;';
ticketData += '&lt;status_id&gt;3&lt;/status_id&gt;';
ticketData += '&lt;/issue&gt;';
xhr.open("PUT", "http://10.18.20.90:3000/issues/3.xml", true);
var auth = Base64.encode("xxx:yyyy");
xhr.setRequestHeader("Authorization", "Basic " + auth);
xhr.setRequestHeader("Content-Type", "text/xml");
xhr.send(ticketData);

Replies (1)

RE: getting blank response for trying to update an issue - Added by Etienne Massip over 11 years ago

If you get 200 then the issue should have been updated?

    (1-1/1)