Hi,
I am trying to update a version in a project using the REST api via .NET
I can sucessfully do GETs but PUTs and POSTs fail with a '400 bad request' error
Here is the code I am using - the json string has been hard-coded (and copied from the API documentation) until I can get this to work:
var request = WebRequest.Create("http://jira-devt:8080/rest/api/2/version");
request.Method = "POST";
request.ContentType = "application/json";
var json = "{\"description\": \"An excellent version\",\"name\": \"New Version 1\",\"userReleaseDate\": \"5-Jul-2010\",\"project\": \"ADAS\",\"releaseDate\": \"2010-07-05\",\"released\": true,\"archived\": false}";
var writer = new StreamWriter(request.GetRequestStream());
writer.Write(json);
writer.Close();
response = request.GetResponse();
Any ideas please?
Thanks
Mark