Hi
I try to add a new issue to JIRA. We installed the latest JIRA to our server and checked the API. We are able to authenticate, list issues, get one specific issue, delete issue… but when we try to create a new issue, we are still getting error: “Unsupported media type“ in the response. We used the example from the API documentation, it is basically 100% copy and we still face the problem. Any idea, is it somehow known to you?
He is the part of our code:
string issueToCreate = "{\"fields\":{\"project\":{\"key\":\"SIM\"},\"summary\":\"REST 1 merry gentlemen.\",\"description\":\"Creating of an issue using project keys and issue type names using the REST API\",\"issuetype\":{\"name\":\"Bug\"}}}";
RestClient client = new RestClient();
client.BaseUrl = "http://10.14.41.152:8076/rest/api/latest/";
client.Authenticator = new HttpBasicAuthenticator(username, password);
// connection established
RestRequest request = new RestRequest("issue", Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddBody(issueToCreate);
request.RequestFormat = DataFormat.Json;
IRestResponse response = client.Execute(request);
Thank you very much in advance!