I am trying to fulfill this rest api:
public async Task AddTimetracking(Issue issue, int spentTime) { // POST /rest/issue/{issue}/timetracking/wo
You might want to set the mediaType in StringContent like below:
var httpContent = new StringContent(workItem.XDocument.ToString(), Encoding.UTF8, "application/xml");